GNOME Bugzilla – Bug 126923
Ending root-owned process from within gnome system monitor hangs app
Last modified: 2011-11-11 10:03:55 UTC
Distribution: Fedora Core release 1 (Yarrow) Package: gnome-applets Severity: normal Version: GNOME2.4.0 2.4.x Gnome-Distributor: GNOME.Org Synopsis: Ending root-owned process from within gnome system monitor hangs app Bugzilla-Product: gnome-applets Bugzilla-Component: multiload Bugzilla-Version: 2.4.x Description: Description of Problem: When running System Monitor as a non-root user, choosing to end a root-owned process triggers a root password request, after which the app hangs. Steps to reproduce the problem: 1. Run gnome-system-monitor as non-root user 2. Choose a root-owned process, hit End Process 3. Enter root password, app hangs Actual Results: App hangs, root process does not end. Expected Results: Root process ends, gnome-system-monitor continues to run. How often does this happen? Every time. Additional Information: ------- Bug moved to this database by unknown@bugzilla.gnome.org 2003-11-13 15:29 ------- The original reporter (jason_brooks@ziffdavis.com) of this bug does not have an account here. Reassigning to the exporter, unknown@bugzilla.gnome.org. Reassigning to the default owner of the component, gnome-applets-maint@bugzilla.gnome.org.
Yeah, I see the same behavior with HEAD compiled on Fedora Core.
Created attachment 21576 [details] [review] Patch to fix this (Also see the additional comments below)
a) The patch fixes the defect. The slave side of the pseudo terminal has to be opened, which has to be dup2()ed to '0'. There is an issue over here. The getpt() function does not do call the grantpt() and unlockpt() function in glibc on Linux, but the emulations of the getpt() function for BSD and SUN call these functions. These emulations should leave out the calls to grantpt() and unlockpt(). b) Another minor change has also been made. When the "End Process" button is clicked on the warning dialog, the dialog is not destroyed immediately but after the root password window is processed and the process is killed.
Patch applied. Thanks so much for fixing this Kiran!
*** Bug 113471 has been marked as a duplicate of this bug. ***