Path: utzoo!attcan!uunet!ncrlnk!ncrcae!hubcap!gatech!bloom-beacon!athena.mit.edu!jtkohl From: jtkohl@athena.mit.edu (John T Kohl) Newsgroups: comp.bugs.4bsd Subject: 4.3BSD csh: piping into subshells sometimes loses Message-ID: <8486@bloom-beacon.MIT.EDU> Date: 16 Dec 88 14:35:18 GMT Sender: daemon@bloom-beacon.MIT.EDU Reply-To: jtkohl@athena.mit.edu (John T Kohl) Organization: Massachusetts Institute of Technology Lines: 35 Index: bin/csh 4.3BSD Description: Output piped into a subshell starting a backgrounded process works when in an interactive shell, but not when in a shell script. The same script, when run directly and executed as csh -f , fails, while it works when source'd. The manual page says nothing relevant about pipes into subshells. Repeat-By: prompt% /bin/csh -f % cat /tmp/foo.csh #!/bin/csh -f echo foo bar baz |(tee /tmp/foobar &) exit 0 % source /tmp/foo.csh foo bar baz % cat /tmp/foobar foo bar baz % rm /tmp/foobar % /tmp/foo.csh % cat /tmp/foobar % rm /tmp/foobar % /bin/csh -f /tmp/foo.csh % cat /tmp/foobar % exit John Kohl Digital Equipment Corporation/MIT Project Athena (As usual, the opinions expressed above do not necessarily reflect the opinions of my employer. :-)