On Tue, Dec 17, 2024 at 9:25 AM Bruno Haible via Gnulib discussion
list <bug-gnulib@gnu.org> wrote:
...
> 2024-12-17  Bruno Haible  <br...@clisp.org>
>
>         xstdopen: Improve error message.
>         * lib/xstdopen.c (xstdopen): Improve error message. Ignore the errno
>         value.
>
> diff --git a/lib/xstdopen.c b/lib/xstdopen.c
> index 678c2a9d9f..b82f44f0a8 100644
> --- a/lib/xstdopen.c
> +++ b/lib/xstdopen.c
> @@ -31,5 +31,9 @@ xstdopen (void)
>  {
>    int stdopen_errno = stdopen ();
>    if (stdopen_errno != 0)
> -    error (exit_failure, stdopen_errno, _("standard file descriptors"));
> +    /* Ignore stdopen_errno in the error message, since it may be misleading
> +       (see stdopen.c).  */
> +    error (exit_failure, 0,
> +           _("failed to open all three standard file descriptors; maybe %s 
> or %s are not working right?"),
> +           "/dev/null", "/dev/full");
>  }

Nice. Thank you for fixing those things for both gzip and diffutils!

Reply via email to