Path: utzoo!attcan!uunet!cs.utexas.edu!synoptics!bionet!agate!shelby!neon!Gang-of-Four!dkeisen From: dkeisen@Gang-of-Four.Stanford.EDU (Dave Eisen) Newsgroups: comp.unix.internals Subject: Re: fork() and close() Message-ID: <1990Oct25.045156.7712@Neon.Stanford.EDU> Date: 25 Oct 90 04:51:56 GMT References: <364@lysator.liu.se> Sender: news@Neon.Stanford.EDU (USENET News System) Distribution: comp Organization: Sequoia Peripherals Lines: 21 In article <364@lysator.liu.se> pen@lysator.liu.se (Peter Eriksson) writes: > > >And, is there any portable way to code a wait in the parent to be sure >that the child has begun executing? Not the world's most efficient solution, but you can open a pipe before you fork, close both ends in the child, close the write end in the parent and then read one byte from the read end. The parent will sleep in the read until the child closes the write end of the pipe. -- Dave Eisen Home: (415) 323-9757 dkeisen@Gang-of-Four.Stanford.EDU Office: (415) 967-5644 1447 N. Shoreline Blvd. Mountain View, CA 94043