Red Hat Bugzilla – Bug 165193
[RHEL-4] gnome-pty-helper doesn't clean up gnome-terminals' utmp/wtmp entries when killed
Last modified: 2007-11-30 17:07:19 EST
+++ This bug was initially created as a clone of Bug #159363 +++
Description of problem:
The utmp entries of gnome-terminals run under vnc don't get cleaned up if the
vnc session is killed via 'vncserver -kill <display>'. This is because vncserver
doesn't just kill the gnome-terminals as a user would, but rather kills all
child processes, which includes gnome-pty-helper. gnome-pty-helper just dies,
leaving the stale utmp/wtmp entries to potentially confuse subsequent users of
'/bin/who -u', which isn't supposed to show entries for dead processes.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
(This occurs naturally when a vncserver running gnome-terminals is killed using
'vncserver -kill <display number>' but the below process is much simpler)
1. start a gnome-terminal (note the tty)
2. kill both the gnome-terminal and gnome-pty-helper with SIGHUP
3. check 'who -u' output
The entry for the gnome-terminal is still there although the terminal is gone
No 'who -u' output for dead gnome-terminal
I've seen the gnome-terminal get SIGPIPE and as a result send SIGTERM to
gnome-pty-helper and I've also seen gnome-pty-helper get SIGHUP from (I guess)
Patch from Dave Lehman <firstname.lastname@example.org> at:
Patch was committed to HEAD upstream.
The original patch was broken (ie. doing nasty things in the signal handler).
This upstream patch (on top of the old one) should fix it:
Ray, let me know if you need the final patch backported.
Bastien, can you attach a final patch?
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release. Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products. This request is not yet committed for inclusion in an Update
Created attachment 143990 [details]
I also included the patch from:
Patch compiles fine.
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.