octave-maintainers
[Top][All Lists]
Advanced

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

Re: exit value


From: Jordi Gutiérrez Hermoso
Subject: Re: exit value
Date: Tue, 16 Jul 2013 10:27:23 -0400

On 16 July 2013 10:21, Mike Miller <address@hidden> wrote:
> On Tue, Jul 16, 2013 at 10:09:54 -0400, Jordi Gutiérrez Hermoso wrote:
>> I don't understand, what does EOF have to do with it? Why was this
>> check there in the first place?
>
> EOF happens to be defined to -1. This check goes way back in the
> Octave history, for all I know the parser no longer returns a value of
> EOF, but I think it may in some cases. In that case, clean_up_and_exit
> was coercing a -1 exit status into a 0 for success on EOF, which means
> exit(-1) was changed to zero before it was passed to libc exit. I
> changed this to be handled in main_loop instead.

Oh, I see. Well, I feel dumb for not catching that. We should be
putting this sort of explanation in our commit messages...

- Jordi G. H.


reply via email to

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