Hide Forgot
Created attachment 550331 [details] test case Description of problem: If in a 'perl' script, a successful open/die/close sequence is followed by a system/die sequence, an expected perl internal error triggers the die clause in the system/die call even when the call to system is successful. The call to open issues an ioctl(TCGETS) to test if the newly opened file is a tty device and receives an errno ENOTTY 25 (Inappropriate ioctl for device). This error persists somehow such that it incorrectly triggers the die clause later on. Version-Release number of selected component (if applicable): Several version of 'perl' including 5.8.8 (RHEL5) and 5.8.10 (RHEL6). How reproducible: Run the attached test case. Actual results: test fails with "error executing date Inappropriate ioctl for device" Expected results: test should succeed
Created attachment 550332 [details] strace showing details of issue
Reported upstream: https://rt.perl.org/rt3/Public/Bug/Display.html?id=107420
Bad script rather than perl bug. Sorry for the erroneous report.
Thanks for clearing this issue with upstream. I'm closing it as NOTABUG - Successful system calls do not (necessarily) reset $!, so your script is just printing out the existing value of $! after a successful system().