Bug 771257 - perl5: open/die triggers 'die' in subsequent system/die
Summary: perl5: open/die triggers 'die' in subsequent system/die
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: perl
Version: 6.2
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: rc
: ---
Assignee: perl-maint-list
QA Contact: BaseOS QE - Apps
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-01-02 23:52 UTC by starlight
Modified: 2012-01-03 07:08 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-01-03 07:08:26 UTC
Target Upstream Version:


Attachments (Terms of Use)
test case (193 bytes, application/octet-stream)
2012-01-02 23:52 UTC, starlight
no flags Details
strace showing details of issue (19.02 KB, text/plain)
2012-01-02 23:53 UTC, starlight
no flags Details

Description starlight 2012-01-02 23:52:50 UTC
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

Comment 1 starlight 2012-01-02 23:53:33 UTC
Created attachment 550332 [details]
strace showing details of issue

Comment 3 starlight 2012-01-03 00:33:50 UTC
Reported upstream:

https://rt.perl.org/rt3/Public/Bug/Display.html?id=107420

Comment 4 starlight 2012-01-03 02:04:55 UTC
Bad script rather than perl bug.  Sorry for the erroneous report.

Comment 5 Marcela Mašláňová 2012-01-03 07:08:26 UTC
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().


Note You need to log in before you can comment on or make changes to this bug.