On Sat Apr 26 13:01:39 2014, jhi wrote: > Attached. --- a/doio.c +++ b/doio.c @@ -755,7 +755,8 @@ S_openn_cleanup(pTHX_ GV *gv, IO *io, PerlIO *fp, char *mode, const char *oname, #if defined(HAS_FCNTL) && defined(F_SETFD) if (fd >= 0) { dSAVE_ERRNO; - fcntl(fd,F_SETFD,fd > PL_maxsysfd); /* can change errno */ + if (fcntl(fd,F_SETFD,fd > PL_maxsysfd) < 0) /* can change errno */ + goto say_false; RESTORE_ERRNO; } #endif Should this PerlIO_close() the handle before C< goto say_false > ? I suspect we should be using FD_CLOEXEC in a few other places, but that's not made any worse by your patch. Tony --- via perlbug: queue: perl5 status: new https://rt.perl.org/Ticket/Display.html?id=121745Thread Previous