Shell out bug in pg (Actually: wait bug in V7 tar)

jack at boring.UUCP jack at boring.UUCP
Fri Mar 15 23:42:36 AEST 1985


Well, for the benefit of all V7 users that are still out there:
There is a bug like this in Version 7 tar.
When it has to make a new directory, it does something like

	if( fork() == 0) {
		exec("/bin/mkdir",....)
		exit();
	}
	while( wait(NULL) > 0 );	<--- GRRRRR

Now, guess what happens when you start up tar in the receiving
end of a pipe.......

(For those who don't like guessing: The shell sets up pipes so
that the front end is a child of the back end. This means that,
besides the mkdir, tar will have another child, being the first
end of the pipe. This means that the second wait will take a
*very* long time........)

-- 
	Jack Jansen, {decvax|philabs|seismo}!mcvax!jack
It's wrong to wish on space hardware.



More information about the Comp.unix.wizards mailing list