This service will be undergoing maintenance at 00:00 UTC, 2016-08-01. It is expected to last about 1 hours

Bug 124518

Summary: xterm -into and -e options don't work together
Product: Red Hat Enterprise Linux 3 Reporter: James Armstrong <james_armstrong>
Component: xtermAssignee: Jason Vas Dias <jvdias>
Status: CLOSED ERRATA QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 3.0CC: benl, dickey
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard: RHEL3U7NAK
Fixed In Version: RHBA-2006-0422 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-05-10 17:30:06 EDT Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Bug Depends On:    
Bug Blocks: 187539    

Description James Armstrong 2004-05-27 01:58:13 EDT
Description of problem:

xterm will not honor -e option if -into option is used.

Version-Release number of selected component (if applicable):
xterm-179-5.EL

How reproducible:
Every Time.

Steps to Reproduce: Enter:
1.wish
2.toplevel .ac -container 1
3.exec xterm -into [expr [winfo id .ac ] ] -e vim &

(the expr above has the effect of converting the window ID from hex
notation to decimal.)
  
Actual results:

As if you only did

exec xterm -into [expr [winfo id .ac ] ]

Expected results:

Would like to see vim in the window.

Additional info:
The "break" on line 1966 should be a "continue" like all previous
options except "e".  The "break" makes sense for the "e" option
because, as documented, it must be the last option if it is used. 

        case 'i':
            if (argc <= 1) {
                Syntax(*argv);
            } else {
                char *endPtr;
                --argc;
                ++argv;
                winToEmbedInto = (Window) strtol(argv[0], &endPtr, 10);
            }
            break;   <<< Make this continue;
 

I've tested this fix on fedora where it is also needed.
Comment 1 James Armstrong 2004-05-27 02:00:08 EDT
The above code snippet refers to main.c
Comment 2 Thomas E. Dickey 2004-05-29 07:40:38 EDT
That's a useful bug report, but (I should add it to my FAQ),
Redhat rarely forwards them upstream.  Having said that, there's
no reason for Mike Harris to paste in the boilerplate comment
that you will note in most of the other reports for xterm.
Comment 3 Mike A. Harris 2004-06-02 02:14:01 EDT
Hi Thomas,

The fix above appears to be correct after a preliminary review of
the option processing.  I'll add the patch to my next xterm build,
if you approve the fix.  I'm going to be doing a few erratum soon
for FC1, and could add in xterm as well, since it is such a simple
fix.

Thanks guys!
Comment 4 Thomas E. Dickey 2004-06-02 17:20:29 EDT
the fix looks right to me, too.
Comment 5 Thomas E. Dickey 2004-06-09 19:10:54 EDT
I added this fix to xterm #191
Comment 6 Mike A. Harris 2004-06-11 14:46:27 EDT
Queued fix for next xterm build for RHEL3.

Thanks guys.
Comment 7 Mike A. Harris 2004-06-18 18:18:49 EDT
Updated xterm to version 191 in rawhide for FC3.

Patch still queued for future RHEL3 update.
Comment 14 Mike A. Harris 2005-06-29 13:53:55 EDT
Fixed in xterm-179-5.EL.1, scheduled for potential inclusion in RHEL3U6.

Setting status to MODIFIED.
Comment 27 Red Hat Bugzilla 2006-05-10 17:30:06 EDT
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-2006-0422.html