🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: net.bugs.usg
Article #31

tar hangs if at end of pipeline

#31
From: Mark Plotnick
Date: Mon, 26 Mar 1984 23:47
13 lines
1057 bytes
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
Technical Details
Message-ID: <287@whuxle.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!floyd!whuxle!mp

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.1 6/24/83; site whuxle.UUCP
Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!floyd!whuxle!mp
From: mp@whuxle.UUCP (Mark Plotnick)
Newsgroups: net.bugs.usg
Subject: tar hangs if at end of pipeline
Message-ID: <287@whuxle.UUCP>
Date: Mon, 26-Mar-84 18:47:33 EST
Article-I.D.: whuxle.287
Posted: Mon Mar 26 18:47:33 1984
Date-Received: Tue, 27-Mar-84 02:03:05 EST
Organization: Bell Labs, Whippany
Lines: 13