|
|
Log in / Subscribe / Register

Namespaces in operation, part 4: more on PID namespaces

Namespaces in operation, part 4: more on PID namespaces

Posted Feb 15, 2019 7:59 UTC (Fri) by mkerrisk (subscriber, #1978)
In reply to: Namespaces in operation, part 4: more on PID namespaces by ywchang
Parent article: Namespaces in operation, part 4: more on PID namespaces

> Why the orphan process is not reaped by `init` process?
> And why the PPid is becoming 0?

When a process becomes orphaned it is reparented to the init process *in the PID namespace of its parent*.

When you run the 'orphan' program without the '-f' option, then the child is in the new PID namespace, but its parent is still in the initial PID NS. Thus the orphan gets reparented to init in the initial PID namespace.

PPid == 0 is the system's way of telling the child process that it has no visible parent (because the parent is in another PID namespace).


to post comments

Namespaces in operation, part 4: more on PID namespaces

Posted Feb 16, 2019 7:04 UTC (Sat) by ywchang (guest, #130070) [Link]

This clears my doubt! Thanks so much for your explanation!


Copyright © 2026, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds