LWN.net Logo

Process IDs in a multi-namespace world

Process IDs in a multi-namespace world

Posted Nov 6, 2007 20:52 UTC (Tue) by martinfick (subscriber, #4455)
In reply to: Process IDs in a multi-namespace world by iq-0
Parent article: Process IDs in a multi-namespace world

One problem with this is that you can't have the 'root-parent' for each namespace with a PID
of 1 then.  This could be faked so that this process has a unique global id but appears to
system tools (other processes) as PID 1.  I don't think it needs to think of itself as PID 1,
does it?

I'm not sure of if there are other problems?


(Log in to post comments)

Process IDs in a multi-namespace world

Posted Nov 6, 2007 21:36 UTC (Tue) by iq-0 (subscriber, #36655) [Link]

Good point, I had overlooked that one. There are some programs that check for pid 1 (I thought
bash did that, and init too). From a pure technical standpoint it shouldn't matter too much
but I can imagine tons of code checking if their parent is 1 (daemonize checks eg.)

Process IDs in a multi-namespace world

Posted Nov 8, 2007 18:43 UTC (Thu) by brouhaha (subscriber, #1698) [Link]

I can't think of any good reason for any program (other than perhaps init itself and telinit)
to care what PID init has, and even those could be changed to use a better mechansim.

In particular, whether a program runs as a daemon or not should definitely NOT be determined
by the PPID.

The PID should be viewed as an entirely opaque data type, and shouldn't need namespaces.

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