<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "http://bugs.gentoo.org/bugzilla.dtd">

<bugzilla version="2.22.7"
          urlbase="http://bugs.gentoo.org/"
          maintainer="bugzilla@gentoo.org"
>

    <bug>
          <bug_id>191452</bug_id>
          
          <creation_ts>2007-09-06 01:05 0000</creation_ts>
          <short_desc>sys-apps/util-linux-2.13. - resized &quot;xterm -e script&quot; session window will cause xterm to die but script still runs</short_desc>
          <delta_ts>2007-10-05 23:26:41 0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>Gentoo Linux</product>
          <component>Applications</component>
          <version>unspecified</version>
          <rep_platform>AMD64</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>shr1k3@gmail.com</reporter>
          <assigned_to>base-system@gentoo.org</assigned_to>
          <cc>gentoo@necoro.eu</cc>

      

      
          <long_desc isprivate="0">
            <who>shr1k3@gmail.com</who>
            <bug_when>2007-09-06 01:05:32 0000</bug_when>
            <thetext>If &quot;script&quot; is launched in an xterm (or Eterm) window using the &quot;-e&quot; option, such as &quot;xterm -e script&quot;, and the window is resized, the xterm session will die. The script command, however, will still continue to run. This only happens with the script in sys-apps/util-linux-2.13. The version in sys-apps/util-linux-2.12r-r7 does not show this behaviour.

Reproducible: Always

Steps to Reproduce:
1.xterm -e script
2.Resize the xterm window using mouse
3.xterm window will crash
4.&quot;ps -eaf |grep script&quot; will show script is still running

Actual Results:  
Xterm or Eterm (the only two terminals I tested) crash

Expected Results:  
I expect the terminal to remain. A resize should not cause the windows to disappear.

An strace of a running sys-apps/util-linux-2.13-r1 &quot;script&quot; process launched using &quot;xterm -e script&quot; and the window is resized. The terminal window is killed by the resize and disappears:

Process 26816 attached - interrupt to quit
read(0, 0x7fffa196a340, 8192)           = ? ERESTARTSYS (To be restarted)
--- SIGWINCH (Window changed) @ 0 (0) ---
ioctl(0, TIOCGWINSZ, {ws_row=27, ws_col=80, ws_xpixel=499, ws_ypixel=355}) = 0
ioctl(5, TIOCSWINSZ, {ws_row=27, ws_col=80, ws_xpixel=499, ws_ypixel=355}) = 0
kill(26817, SIGWINCH)                   = 0
rt_sigreturn(0x68c1)                    = -1 EINTR (Interrupted system call)
ioctl(0, SNDCTL_TMR_CONTINUE or TCSETSF, {B38400 opost isig icanon echo ...}) = 0
write(1, &quot;Script done, file is test.log\n&quot;, 30) = 30
exit_group(0)                           = ?
Process 26816 detached


-----------
The next strace is from a running sys-apps/util-linux-2.12r-r7 &quot;script&quot; launched using &quot;xterm -e script&quot; and resizing the terminal window. This window does not get killed:

Process 29575 attached - interrupt to quit
read(0, 0x7fff2c9d6450, 8192)           = ? ERESTARTSYS (To be restarted)
--- SIGWINCH (Window changed) @ 0 (0) ---
ioctl(0, TIOCGWINSZ, {ws_row=27, ws_col=80, ws_xpixel=499, ws_ypixel=355}) = 0
ioctl(5, TIOCSWINSZ, {ws_row=27, ws_col=80, ws_xpixel=499, ws_ypixel=355}) = 0
kill(29576, SIGWINCH)                   = 0
rt_sigreturn(0x7388)                    = 0
read(0,  &lt;unfinished ...&gt;
Process 29575 detached</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>vapier@gentoo.org</who>
            <bug_when>2007-10-05 23:26:41 0000</bug_when>
            <thetext>reported upstream and they fixed it which ive added to 2.13-r2</thetext>
          </long_desc>
      
    </bug>

</bugzilla>