🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.bash.bug
Article #1012

piping from a loop hangs

#1012
From: perf
Date: Mon, 12 Jun 1989 22:29
28 lines
1281 bytes
Bash 0.99, sun 3/50, SunOS 4.0.1

I found this bug in 0.95 (and reported it) but it't still there in 0.99.

Piping output from a loop never writes an EOF and the command that
reads from the pipe hangs.

This hangs:

	bash$ for i in 1 2 3 4 5; do
	bash> echo $i
	bash> done | cat

But this works:

	bash$ for i in 1 2 3 4 5; do
	bash> echo $i
	bash> done | cat /dev/null

since /dev/null supplies the EOF character.

	/Per
 ____________________________________________________________________________
| Per Foreby -- system manager at School | Email: perf@efd.lth.se            |
|   of Electrical Engineering, Computer  | Snail: Tekniska Hogskolan i Lund, |
|   Science and Engineering Physics,     |    Box 118, S-221 00 LUND, Sweden |
|   Lund Institute of Technology, Sweden | Phone: int + 46 46-10 75 98       |
|________________________________________|___________________________________|
Technical Details
Message-ID: <8906122229.AA01292@osiris.efd.lth.se>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!efd.lth.se!perf

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!efd.lth.se!perf
From: perf@efd.lth.se
Newsgroups: gnu.bash.bug
Subject: piping from a loop hangs
Message-ID: <8906122229.AA01292@osiris.efd.lth.se>
Date: 12 Jun 89 22:29:32 GMT
Sender: daemon@tut.cis.ohio-state.edu
Distribution: gnu
Organization: GNUs Not Usenet
Lines: 28