[Top][All Lists]

[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: Gecko/20100228 Lightning/0.9 Thunderbird/ Mnenhy/

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 

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 
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.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]