tar hangs if at end of pipeline
Mark Plotnick
mp at whuxle.UUCP
Tue Mar 27 09:47:33 AEST 1984
If tar is at the end of a simple pipeline that was crafted
by sh, it will probably hang if it needs to mkdir anything.
This is because it forks off a mkdir process and waits for ALL
the children to die. Well, under the Bourne shell, the process
that's feeding into the tar (e.g. cat) is also a child, and it's
not gonna exit until it has written all its stuff down the pipe to
tar, which at the moment isn't doin' any reading.
The fix, which is in Berkeley's version, is to do wait()s only
until the mkdir child finishes.
Mark Plotnick
Bell Labs, Whippany
More information about the Net.bugs.usg
mailing list