Bug 159363 - gnome-pty-helper doesn't clean up gnome-terminals' utmp/wtmp entries when killed
gnome-pty-helper doesn't clean up gnome-terminals' utmp/wtmp entries when killed
Status: CLOSED WONTFIX
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: vte (Show other bugs)
3.0
All Linux
medium Severity medium
: ---
: ---
Assigned To: Ray Strode [halfline]
RHEL3U7NAK
:
Depends On:
Blocks: 170445
  Show dependency treegraph
 
Reported: 2005-06-01 18:32 EDT by David Lehman
Modified: 2007-11-30 17:07 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-03-24 07:14:39 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Catch SIGHUP and SIGTERM so we can clean up login records (582 bytes, patch)
2005-06-01 18:32 EDT, David Lehman
no flags Details | Diff


External Trackers
Tracker ID Priority Status Summary Last Updated
GNOME Desktop 312373 None None None Never

  None (edit)
Description David Lehman 2005-06-01 18:32:16 EDT
Created attachment 115067 [details]
Catch SIGHUP and SIGTERM so we can clean up login records
Comment 1 David Lehman 2005-06-01 18:32:16 EDT
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):
vte-0.11.10-11

How reproducible:
Always

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
  
Actual results:
The entry for the gnome-terminal is still there although the terminal is gone

Expected results:
No 'who -u' output for dead gnome-terminal

Additional info:
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)
vncserver.
Comment 2 Bastien Nocera 2005-08-02 11:08:25 EDT
Pushed upstream:
http://bugzilla.gnome.org/show_bug.cgi?id=312373
Comment 3 Bastien Nocera 2005-08-05 04:27:53 EDT
Patch was committed to HEAD upstream.
Comment 5 Ray Strode [halfline] 2005-10-24 13:10:08 EDT
Hi guys,

That patch looks a little off.  shutdown_helper() probably can't be called
legally from a signal handler.  If it can't then the patch could lead to all
sorts of weirdnesses like segfaults, process lock ups, etc.
Comment 6 Bastien Nocera 2005-10-24 13:34:56 EDT
And some sucker committed that upstream already ;)

Note You need to log in before you can comment on or make changes to this bug.