possible race condition?

Michael Davidson md at sco.COM
Tue May 21 03:09:56 AEST 1991


alex at am.sublink.org (Alex Martelli) writes:

>ronald at robobar.co.uk (Ronald S H Khoo) writes:
>	...
>:Part of the System V interface definition apparently guarantees the
>:child to execute before the parent, I hear -- I'd like chapter and
>:verse from someone who has a copy, if that's not too much trouble.
>Does not look that way to me - SVID 2, p.86, under fork(ba_os), says
>"both processes will run as system resources become available".

>:So, in principle, yes, you're right, but the code works correctly
>:on "real" System V.
>It's possibly that way depending on how it is *implemented*, but it
>does not seem to me that you get any guarantee from the interface
>*specification*.

The SVID does *not* specify whether the child process or the
parent process must execute first. Unfortunately many of the
SVVS tests are rather badly written and have unpleasant timing
windows in them - something you find out as soon as you try to
run SVVS on a multiprocessor system where it is quite possible
that the parent and child will run simultaneously on different
processors.



More information about the Comp.unix.programmer mailing list