pipe breaking mystery

Wolfgang Rupprecht wolfgang at mgm.mit.edu
Wed Aug 16 14:31:58 AEST 1989


Here is a new puzzler.  Observed on a sun3 w. sunos 3.4.  I have a
piped command line passed to /bin/sh in a script for frobbing the RCS
command "ci".  (The script, in theory, checks in all RCS-ed files in a
subtree.)  The pipe sometimes breaks with a partial line making it to
the last section of the pipe and execution stopping prematurely.  When
run one piece at a time it always works.  The script breaking is
probabalistic.  One observed "fact" is that the breakage is usually
within a half screen of ci barfing about something.

Any hints how even to get a handle on this?  I'm curious how other
folks deal with bugs of this type.

This is the script:

	#!/bin/sh
	DIR=`cd ${1-.}; pwd`   # conv to abs path
	find $DIR -name "RCS" -print | sed -e 's:/RCS$::' \
		-e 's:.*:cd & ; ci RCS/*:' | /bin/sh -sx

-wolfgang
Wolfgang Rupprecht	ARPA:  wolfgang at mgm.mit.edu (IP 18.82.0.114)
TEL: (703) 768-2640	UUCP:  mit-eddie!mgm.mit.edu!wolfgang



More information about the Comp.unix.wizards mailing list