On Fri, 01 Sep 2000, you wrote:
> When I fork() inside a program, the PID of the child is
> incremented by two. Very odd. The system has zero activity on
> it, and I can repeatedly get the same result. The program works
> however, it just seems odd to me that the parent's PID is say
> 500, and an immediate fork() gives the child a PID of 502. In
> looking at other programs running in the system, they appear to
> increment by one.
>
> Just an oddity I thought perhaps someone could describe for me...
Mike,
I found this weird as well. (although we should be talking about this on
comp.os.unix.*, but who cares...) I believe the system goes through a
fork/thread manager. When that happens it takes the 501 slot. After all the
kids have been spawned, then it says, " all is well " , and then croaks.
Therefore, an empty spot in between will occur.
If this is wrong, let me know.
Thanks
Jeff
--
Thinks't thou existence doth depend on time?
It doth; but actions are our epochs; mine
Have made my days and nights imperishable,
Endless, and all alike, as sands on the shore,
Innumerable atoms; and one desert,
Barren and cold, on which the wild waves break,
But nothing rests, save carcasses and wrecks,
Rocks, and the salt-surf weeds of bitterness.
_______________________________________________
Redhat-devel-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-devel-list