79730390

Date: 2025-08-09 03:22:28
Score: 0.5
Natty:
Report link

The container will not have a kthreadd, which is always pid 2:

[[ $(ps -p2) ]] && echo host || echo container

This will not work if either:

these would be somewhat obscure conditions.

Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: smemsh