Article View: gnu.utils.bug
Article #1568Gawk 2.10 getline hangs
From: David MacKenzie
Date: Sun, 16 Apr 1989 04:49
Date: Sun, 16 Apr 1989 04:49
20 lines
837 bytes
837 bytes
echo "hi there" > foo
chmod 0 foo
gawk '
BEGIN {
if (getline < "foo" > 0)
print
else
print "cannot open foo"
exit
}'
Getline hangs if it can't open the file, instead of returning -1.
This is under System V, if that matters.
David MacKenzie
mackenzi@thor.stolaf.edu or edf@rocky2.rockefeller.edu
--
David MacKenzie
mackenzi@thor.stolaf.edu or edf@rocky2.rockefeller.edu
Technical Details
Message-ID:
<1861@thor.acc.stolaf.edu>Path:
arc1-ca.pugleaf.net!utzoo!dptcdc!jarvis.csri.toronto.edu!mailrus!csd4.milw.wisc.edu!srcsip!nic.MR.NET!thor.acc.stolaf.edu!mackenziShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!dptcdc!jarvis.csri.toronto.edu!mailrus!csd4.milw.wisc.edu!srcsip!nic.MR.NET!thor.acc.stolaf.edu!mackenzi From: mackenzi@thor.acc.stolaf.edu (David MacKenzie) Newsgroups: gnu.utils.bug Subject: Gawk 2.10 getline hangs Message-ID: <1861@thor.acc.stolaf.edu> Date: 16 Apr 89 04:49:22 GMT Reply-To: mackenzi@thor.stolaf.edu (David MacKenzie) Distribution: na Organization: Environmental Defense Fund Lines: 20