This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Assume that dup3 is available
On Apr 17 2017, Adhemerval Zanella <adhemerval.zanella@linaro.org> wrote:
>> + __dup3 (_IO_fileno (result), fd,
>> + (result->_flags2 & _IO_FLAGS2_CLOEXEC) != 0
>> + ? O_CLOEXEC : 0);
>
> Shouldn't we check the result of __dup3 and act accordingly in this situation
> (basically EINTR and EMFILE)?
I don't think either is possible, since both descriptors are already
allocated.
Andreas.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."