[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: Strange behaviour of the passwd command



John Summerfield wrote:
ppid=1 means its parents quit, right back to init. I won't say it's impossible, just improbable!
Parent, just the one. Orphaned processes have their PPID set to 1, not the parent of the dying process:

$ sh -c 'sleep 10 & sleep 5' &
[1] 5096
$ ps -le | grep sleep
F S   UID   PID  PPID  C PRI  NI ADDR SZ WCHAN  TTY          TIME CMD
0 S  9087  5099  5096  0  77   0 - 13423 -      pts/3    00:00:00 sleep
0 S  9087  5100  5096  0  77   0 - 13423 -      pts/3    00:00:00 sleep
$ sleep 5
[1]+  Done                    sh -c 'sleep 10 & sleep 5'
$ ps -le | grep sleep
F S   UID   PID  PPID  C PRI  NI ADDR SZ WCHAN  TTY          TIME CMD
0 S  9087  5099     1  0  77   0 - 13423 -      pts/3    00:00:00 sleep


(I pasted the headings in by hand, I don't have a magic ps or grep).

jch


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]