Process A creates another process B. Process A then dies, but process B still has the PID of process A marked as its parent process. Later on, a process C starts and is randomly assigned the PID that process A was originally assigned.
Are there any security or other implications of this happening?
A fatal error occured!
Please post threads less often!FUCKING HELL I REMEMBER WHEN SOMEONE SPAMMED /PROG/ AND RUINED IT FOR EVERYONE NOW I CAN NEVER MAKE NEW THREADS Powered by Shiichan 3955 + 4chan 20080608.
>>3
PIDs are generated sequentially on *NIX systems and re-start at zero after all numbers have been exhausted. pid_t is 32 bit (or 64 bit on x64 systems). Assume you'd spawn 100000 processes a day, your system would still need to have an uptime of 60 years before the PID generation starts at zero again.
Show me any system that runs for even a year straight and we'll talk about security implications of repeating PIDs again.
>>9
Doesn't stop your kernel from cycling pids over 2^16.
Name:
Anonymous2009-05-01 16:07
>>1
you got it wrong. in *nix at least, a child process does not inherit that parent's process number; it has its own and the parent process continues to exist as a "zombie" process until the child process is done as well, after which the OS cleans it up. it's impossible for something to "inherit" the parent process' pid.
>>13
You seem to have misinterpreted all of those words.
Name:
Anonymous2009-05-01 16:14
You can get races with programs that deliver signals (killall, for example).
Name:
Anonymous2009-05-01 18:59
In Windows, child processes maintain a link back to the parent process. If the parent dies, this information isn't updated, however this isn't a problem since nothing relies on that information being present.
Name:
Bill Gates III2009-05-02 7:01
>>13>>16
Windows is better in this regard:
'nothing relies on that information'
"process continues to exist as a "zombie" process until the child process is done as well"
Name:
Anonymous2009-05-02 8:08
>>17
Unix was created in the last 60's, so obviously it's going to be naturally inferior to the glorious Windows NT architecture.
>>22
i don't think anyone on /prog/ gets properly Troll'd anymore. it's just Trolls replying to Troll posts because there's no other option. hell, without the Troll replies, there'd be no /prog/ at all!
>>20
It's not a troll. NT really does have a superior architecture and design. To give one excellent example, look at NTFS permissions compared to the ones your standard Unix filesystem. So much more flexible and with beautiful hierarchy.
Name:
Anonymous2009-05-12 20:54
>>26
That's the only thing anyone can actually ever point out as being better. No go off and defrag your NTFS partitions, they need it.