Bug 122558
Summary: | tcsh redirection misbehaving with echo builtin | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 3 | Reporter: | Tony Ernst <tee> |
Component: | tcsh | Assignee: | Miloslav Trmač <mitr> |
Status: | CLOSED ERRATA | QA Contact: | Bill Huang <bhuang> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 3.0 | CC: | hunt |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | ia64 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2004-12-21 15:02:40 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Tony Ernst
2004-05-05 19:18:50 UTC
I looked at traces of both the failing case (mytest) and the appending case (mytest.append). The difference seems to be that in the failing case there's an additional 'fcntl(3, F_DUPFD, 0)' being called after the 'open("./mysubscript", ...)'. This seems likely to be the cause of the problem. mytest trace: ============= open("./mysubscript", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 3 fcntl(3, F_DUPFD, 0) = 4 dup2(3, 1) = 1 close(3) = 0 ioctl(1, TCGETS or SNDCTL_TMR_TIMEBASE, 0x60000ffffffef880) = -1 ENOTTY (Inappropriate ioctl for device) close(2) = 0 dup(18) = 2 fcntl(2, F_SETFD, 0) = 0 rt_sigprocmask(SIG_BLOCK, [], [INT], 8) = 0 rt_sigprocmask(SIG_SETMASK, [], [INT], 8) = 0 write(1, "#!/bin/tcsh\n", 12) = 12 rt_sigprocmask(SIG_BLOCK, [INT], [], 8) = 0 close(0) = 0 close(1) = 0 close(2) = 0 mytrace.append trace: ===================== open("./mysubscript", O_WRONLY|O_APPEND) = 3 dup2(3, 1) = 1 close(3) = 0 ioctl(1, TCGETS or SNDCTL_TMR_TIMEBASE, 0x60000ffffffef870) = -1 ENOTTY (Inappropriate ioctl for device) close(2) = 0 dup(18) = 2 fcntl(2, F_SETFD, 0) = 0 rt_sigprocmask(SIG_BLOCK, [], [INT], 8) = 0 rt_sigprocmask(SIG_SETMASK, [], [INT], 8) = 0 write(1, "#!/bin/tcsh\n", 12) = 12 rt_sigprocmask(SIG_BLOCK, [INT], [], 8) = 0 close(0) = 0 close(1) = 0 close(2) = 0 *** Bug 136418 has been marked as a duplicate of this bug. *** An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on the solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHBA-2004-524.html |