Path: utzoo!attcan!uunet!cs.utexas.edu!usc!bloom-beacon!mgm.mit.edu!wolfgang From: wolfgang@mgm.mit.edu (Wolfgang Rupprecht) Newsgroups: comp.unix.wizards Subject: pipe breaking mystery Message-ID: <13539@bloom-beacon.MIT.EDU> Date: 16 Aug 89 04:31:58 GMT Sender: daemon@bloom-beacon.MIT.EDU Reply-To: wolfgang@mgm.mit.edu (Wolfgang Rupprecht) Organization: Freelance Software Consultant, Washington DC. Lines: 22 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@mgm.mit.edu (IP 18.82.0.114) TEL: (703) 768-2640 UUCP: mit-eddie!mgm.mit.edu!wolfgang