GNOME Bugzilla – Bug 581043
does not terminate properly on shutdown/restart
Last modified: 2009-06-29 22:24:14 UTC
gnome-session does not properly exit if 'Shutdown' or 'Restart' are chosen from the panel menu. This is because the signal that the ConsoleKit request was handled is never emitted. Ergo, gnome-session continues to run, emit shutdown requests, etc. This normally isn't noticed because a properly-handled shutdown request to CK will cause it to get whacked eventually. Replacing /sbin/shutdown with a script that does nothing makes it really obvious. (Noticed because multiple shutdown requests triggered a nasty bug in Fedora's initscripts.)
Created attachment 133755 [details] [review] patch Here's a patch that emits the proper signal on success, not just failure. Also, fixes an error -> error message confusion.
Good catch! Your patch was emitting a signal when it shouldn't (when PolicyKit required some interaction for privilege escalation), but I fixed this.