[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [gawk-stable] bug: fatal error when getline from directory
From: |
Paolo |
Subject: |
Re: [gawk-stable] bug: fatal error when getline from directory |
Date: |
Mon, 5 Jan 2009 14:43:21 +0100 |
User-agent: |
Mutt/1.3.28i |
On Sun, Jan 04, 2009 at 05:06:16PM -0700, Eric Blake wrote:
> POSIX does not require awk to be able to read /dev/random. You are
doesn't prohibit it, either
> outside the realm of POSIX if you feed a non-text file to awk. The fact
not really, according to awk description:
"Input shall be interpreted as a sequence of records. By default, a record
is a line, less its terminating <newline>, but this can be changed by
using the RS built-in variable. "
thus my '1\n1\x002\x003\x004\x00' although not a 'text file' is a legit
input for POSIX awk, since I've defined RS='\0'. Turns out current gawk
does the right thing, whereas plain awk gets it wrong.
> that gawk handles it nicely is intentional, but we would also be
> POSIX-compliant by making gawk reformat your hard drive when you hand it a
> non-text file.
...
> We very well could have; once you leave the realm of POSIX, you have no
> guarantees on what we will or won't do, unless we document that, as an
...
> You didn't get my point. Once you pass a non-text file to awk, you have
> left the realm of what POSIX requires (since POSIX requires that you only
I disagree, POSIX conformance for such situations states:
"Shall not perform any actions that are described as producing undefined
results"
which sounds sane enough.
Re-stating it, back to original bug-rep point, I'm pretty fine with getline
raising an error on attempt reading a dir, till/unless an extension is avail
- actually, I want such behaviour instead of EOF from nawk - yet I deem
it wrong to issue a fatal: and abort script.
While you've provided arguments for awk not trying to read from a dir, I
fail to see any single good point for a fatal abort of getline, instead of
usual & documented rc=-1 on error behaviour, which is the bug reported.
--
paolo
- [gawk-stable] bug: fatal error when getline from directory, Steffen Schuler, 2009/01/01
- Re: [gawk-stable] bug: fatal error when getline from directory, Aharon Robbins, 2009/01/03
- Re: [gawk-stable] bug: fatal error when getline from directory, John Cowan, 2009/01/03
- Re: [gawk-stable] bug: fatal error when getline from directory, Paolo, 2009/01/03
- Re: [gawk-stable] bug: fatal error when getline from directory, Eric Blake, 2009/01/04
- Re: [gawk-stable] bug: fatal error when getline from directory, Paolo, 2009/01/04
- Re: [gawk-stable] bug: fatal error when getline from directory, Eric Blake, 2009/01/04
- Re: [gawk-stable] bug: fatal error when getline from directory, Andreas Schwab, 2009/01/04
- Re: [gawk-stable] bug: fatal error when getline from directory, Paolo, 2009/01/04
- Re: [gawk-stable] bug: fatal error when getline from directory, Eric Blake, 2009/01/04
- Re: [gawk-stable] bug: fatal error when getline from directory,
Paolo <=
- Re: [gawk-stable] bug: fatal error when getline from directory, Eli Zaretskii, 2009/01/04
- Re: [gawk-stable] bug: fatal error when getline from directory, Paolo, 2009/01/04
- Re: [gawk-stable] bug: fatal error when getline from directory, Andreas Schwab, 2009/01/04
- Re: [gawk-stable] bug: fatal error when getline from directory, Eric Blake, 2009/01/04
- Re: [gawk-stable] bug: fatal error when getline from directory, Paolo, 2009/01/04
- Re: [gawk-stable] bug: fatal error when getline from directory, Andrew J. Schorr, 2009/01/05
- Re: [gawk-stable] bug: fatal error when getline from directory, John Cowan, 2009/01/04
- Re: [gawk-stable] bug: fatal error when getline from directory, Eli Zaretskii, 2009/01/04
- Re: [gawk-stable] bug: fatal error when getline from directory, Paolo, 2009/01/05
- Re: [gawk-stable] bug: fatal error when getline from directory, Eli Zaretskii, 2009/01/05