Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!think.com!spool.mu.edu!uunet!sco!md From: md@sco.COM (Michael Davidson) Newsgroups: comp.unix.programmer Subject: Re: possible race condition? Message-ID: <12141@scolex.sco.COM> Date: 20 May 91 17:09:56 GMT Article-I.D.: scolex.12141 References: <1991May9.144935.20078@ge-dab.GE.COM> <1991May9.182241.17090@robobar.co.uk> <1991May11.073648.1970@am.sublink.org> Sender: news@sco.COM Lines: 24 alex@am.sublink.org (Alex Martelli) writes: >ronald@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.