If "script" is launched in an xterm (or Eterm) window using the "-e" option,
such as "xterm -e script", 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."ps -eaf |grep script" 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 "script" process launched
using "xterm -e script" 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, "Script done, file is test.log\n", 30) = 30
exit_group(0) = ?
Process 26816 detached
-----------
The next strace is from a running sys-apps/util-linux-2.12r-r7 "script"
launched using "xterm -e script" 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, <unfinished ...>
Process 29575 detached