nano-devel
[Top][All Lists]
Advanced

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

Re: Terminal resize crashes during lock-file prompt


From: Marco Diego Aurélio Mesquita
Subject: Re: Terminal resize crashes during lock-file prompt
Date: Thu, 21 May 2020 23:00:35 -0300

On 5/21/20, Benno Schulenberg <address@hidden> wrote:
> Fixed in git:
>
>   https://git.savannah.gnu.org/cgit/nano.git/commit/?id=c9482bcd
>

I saw the bug introduced in 10800ee410286c3f19ffa7fd563fe0cf08e3a68a
and the fix in e0d00bc750d4f984a298175a9a8e8d3f30ae948d .  Wouldn't it
be simpler/better to do just this:

-       if (fd > 0)
+       if (fd >= 0)

Considering that "man 3 open" just says:

       Upon  successful  completion,  these  functions shall open the file and
       return a non-negative integer representing the lowest  numbered  unused
       file  descriptor.

I see no reason why open could not return 0.



reply via email to

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