NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: awk flea?



petar%smokva.net@localhost (Petar Bogdanovic) writes:

>>              awk: i/o error occurred while closing /dev/stdin
>>               source line number 1

>Seems to be a /bin/sh feature/bug, since I don't get this error when
>using /bin/ksh as the interpreter.

I guess it's both.

awk (nawk) assumes that stdin/stdout/stderr exist in stdinit() and
closes stdin/stdout/stderr together with all other descriptors
in closeall().

And /bin/sh runs a program called within a here document with
descriptor 0 closed.

-- 
-- 
                                Michael van Elst
Internet: mlelstv%serpens.de@localhost
                                "A potential Snark may lurk in every tree."


Home | Main Index | Thread Index | Old Index