Shell problems with redirection

Colin Biggin dmntor!dmnboss!colin at uunet.uu.net
Sat Mar 3 18:53:55 AEST 1990


We are having problems with two shell files that run in the background.
The first is:

	#!/bin/sh
	while :
	do
		myprog > /tmp/aw$$
		ed - /tmp/aw$$ <<\!
	s/.*: *[^ ]* *[^ ] *[^ ]* *[^ ]* *[^ ]* *[^ ]* *//
	w
	!
		. /tmp/aw$$
	done

It runs forever.  Sometimes we find /tmp/sh* files lying around
with the contents of the << file in them.  When this happens
the ed sometimes fails.  We are suspicious that this process
also causes the system to run out of file descriptors.

The second program is:

	#!/bin/csh -f
	myprog1 >> /u/logs/logfile
	myprog2 >> /u/logs/logfile

Sometimes when this is run in the background the output from
myprog1 and 2 gets intermingled.

We have workarounds for both of these problems but we would
like to know if they are known bugs and if there are patches
for them or if they are fixed in 4.1.

Colin Biggin
Digital Media Networks
Toronto, Ontario



More information about the Comp.sys.sun mailing list