Re: [PATCH] runsv: fix open error check (fd < -1 should be fd < 0)

Denys Vlasenko via busybox <[email protected]>
Newsgroups gmane.linux.busybox
Message-ID <CAK1hOcN=i44SSLCBtCv6FMi-WYLqwA0yUn-bKtC08fWmB38Lfg@mail.gmail.com>
Applied, thank you

On Mon, Mar 9, 2026 at 12:27 PM Weixie Cui via busybox
<[email protected]> wrote:
>
> From: Weixie Cui <[email protected]>
>
> ---
>  runit/runsv.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/runit/runsv.c b/runit/runsv.c
> index 20a445319..df7c59ac6 100644
> --- a/runit/runsv.c
> +++ b/runit/runsv.c
> @@ -210,7 +210,7 @@ static void update_status(struct svdir *s)
>
>         /* stat */
>         fd = open_trunc_or_warn(fstatnew);
> -       if (fd < -1)
> +       if (fd < 0)
>                 return;
>
>         {
> --
> 2.39.5 (Apple Git-154)
>
> _______________________________________________
> busybox mailing list
> [email protected]
> https://lists.busybox.net/mailman/listinfo/busybox
_______________________________________________
busybox mailing list
[email protected]
https://lists.busybox.net/mailman/listinfo/busybox
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.