in reply to Bad file descriptor error in Win32 VC2015 compiled perl-5.20.3
My suggestion: print the value of fileno(STDOUT) just prior to the open.
The OS error message: "Bad file descriptor"; suggests that STDOUT has been closed prior to the flow arriving at that open statement; and you can't dup a closed file handle.
If you get nothing (undef) rather than 2, then you'll need to step back and work out where the filehandle is being closed.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Bad file descriptor error in Win32 VC2015 compiled perl-5.20.3
by shadowsong (Pilgrim) on Mar 22, 2016 at 15:17 UTC |