🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.bugs.4bsd
Article #1299

4.3BSD csh: piping into subshells sometimes loses

#1299
From: John T Kohl
Date: Fri, 16 Dec 1988 14:35
35 lines
1295 bytes
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 <filename>, 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 <jtkohl@ATHENA.MIT.EDU>
Digital Equipment Corporation/MIT Project Athena
(As usual, the opinions expressed above do not necessarily reflect the
opinions of my employer. :-)
Technical Details
Message-ID: <8486@bloom-beacon.MIT.EDU>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!ncrlnk!ncrcae!hubcap!gatech!bloom-beacon!athena.mit.edu!jtkohl

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!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