fork() and close()
Dave Eisen
dkeisen at Gang-of-Four.Stanford.EDU
Thu Oct 25 14:51:56 AEST 1990
In article <364 at lysator.liu.se> pen at 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 at Gang-of-Four.Stanford.EDU Office: (415) 967-5644
1447 N. Shoreline Blvd.
Mountain View, CA 94043
More information about the Comp.unix.internals
mailing list