[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: a recursion bug
From: |
Linda A. Walsh |
Subject: |
Re: a recursion bug |
Date: |
Tue, 02 Oct 2012 21:09:33 -0700 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.8.1.24) Gecko/20100228 Lightning/0.9 Thunderbird/2.0.0.24 Mnenhy/0.7.6.666 |
Steven W. Orr wrote:
I think there's a fundamental misunderstanding between the difference of
an error code returned by a system call and the exit status of a
process. They're two completely different things.
----
It's not a fundamental misunderstanding. It's a fundamental belief
in using data bandwidth and not wasting it. If 0=ok, as it does in bash and
with errno, and, it is the case (still is), that errno's fit in 1 byte,
there's no reason not to return the exact failure mode from a util...
That's not to say that many or most do -- some even return a status
of '0' on fatal errors (xfs_mkfile -- on running out of room returns a status
0).
Just for fun, look at the man page for grep. It is advertised to return
a 0, 1 or 2. The actual values of errno that might happen in the middle
are a separate problem.
----
Like I said, it's a fundamental waste of bits.
But -- if it encountered an error, should it issue a SEGV and coredump
message,
or should it terminate the wayward script/function and return to the prompt?
Hey you can do whatever, but if the linux kernel crashed on every resource
strain, most people would consider that bad.
- Re: a recursion bug, Linda Walsh, 2012/10/02
- Re: a recursion bug, Greg Wooledge, 2012/10/02
- Re: a recursion bug, Linda Walsh, 2012/10/02
- Re: a recursion bug, Bob Proulx, 2012/10/02
- Re: a recursion bug, Steven W. Orr, 2012/10/02
- Re: a recursion bug,
Linda A. Walsh <=
- Re: a recursion bug, Bob Proulx, 2012/10/03
- Re: a recursion bug, Greg Wooledge, 2012/10/03
- Re: a recursion bug, Chet Ramey, 2012/10/03
- Re: a recursion bug, Bob Proulx, 2012/10/03
- Re: a recursion bug, Chet Ramey, 2012/10/04
- Re: a recursion bug, Dan Douglas, 2012/10/04
- Re: a recursion bug, Bob Proulx, 2012/10/03
- Re: a recursion bug, Eric Blake, 2012/10/03
- RE: a recursion bug, Yuxiang Cao, 2012/10/03