Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: xtrace output sets ERRNO to 9 (EBADF)



On Sun, Dec 11, 2022 at 10:36 AM Stephane Chazelas
<stephane@xxxxxxxxxxxx> wrote:
>
> > This ignores any errors from the fileno() and fclose() calls as well, though?
>
> Yes, though it's probably just  as well. Users use $ERRNO to
> detect errors while doing operations they asked for.

Exactly; xtrace shouldn't be affecting program errors.  In any case,
fileno() doesn't set errno (it's just a data structure deref, would
only fail by crashing) and zclose() already clobbers the error from
fclose().




Messages sorted by: Reverse Date, Date, Thread, Author