Bug 613704

Summary: Metacity doesn't restart when it dies or is killed
Product: Red Hat Enterprise Linux 6 Reporter: jmccann
Component: metacityAssignee: Owen Taylor <otaylor>
Status: CLOSED NOTABUG QA Contact: desktop-bugs <desktop-bugs>
Severity: medium Docs Contact:
Priority: low    
Version: 6.0CC: cschalle, syeghiay, tpelka
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-08-02 22:17:42 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description jmccann 2010-07-12 15:48:14 UTC
Sending a kill or segv to metacity causes it to exit.  What is unexpected is that it doesn't restart.  Either metacity isn't requesting that the session restart it or the session isn't doing the right thing.

Comment 4 Owen Taylor 2010-08-02 22:17:42 UTC
The behavior of Metacity is that it:

 - Restarts if it dies abnormally - SEGV, KILL, etc
 - Does not restart if killed with signals it catches like TERM or PIPE

This seems like a reasonable behavior - why would you kill metacity with TERM if you wanted it to start immediately?

Testing with metacity-2.28.0-15.el6 2.28.0-18.el6:

 killall -SEGV metacity # restarts
 killall -KILL metacity # restarts
 killall -TERM metacity # does not restart

Note that there is a bug in gnome-session (not metacity) that means that metacity doesn't restart unless it was started by gnome-session (either at login or as a restart after crashing). 

That means in particular that after metacity does not restart in the above sequence, if you start it manually from a terminal, it will never restart until you log out and log back in.

This would also come up if you switched to compiz using desktop-effects and switched back.

I filed this upstream as:

 https://bugzilla.gnome.org/show_bug.cgi?id=625881

But I don't think this gnome-session bug is a critical bug for RHEL:

 - Switching window managers isn't the normal case - almost all the time metacity will have been started by gnome-session and will properly restart.
 - Metacity isn't supposed to crash in the first place! The restart code is just there as a backup safety measure.

Closing this as NOTABUG, since the Metacity behavior is as intended and the gnome-session bug is separate.