On Sun, Sep 23, 2001 at 03:41:35PM -1000, Sidik Isani wrote: > > We've been using the fvwm-1.24r for years with the following patch > to prevent clean-up problems when users log out. The problem was > sometimes users start things from their window manager menus which > are not intended to be daemons, but also do not launch any windows, > or the windows do not respond to the right signals to clean up when > fvwm2 exits. At the very least, we frequently were left with bogus > processes still running, and in the worst cases, the X greeter would > not restart. Maybe someone else understands this better, but simply > having the window manager try to clean up all its child processes > when it exits (not restarts) has worked quite well: > > diff -ru fvwm-snap-20010916/fvwm/fvwm.c fvwm-2.5.0-cfht/fvwm/fvwm.c > --- fvwm-snap-20010916/fvwm/fvwm.c Fri Sep 14 01:00:07 2001 > +++ fvwm-2.5.0-cfht/fvwm/fvwm.c Tue Sep 18 19:55:12 2001 > @@ -1675,6 +1675,17 @@ > */ > ClosePipes(); > > + /* Any processes which FVWM started should also exit now, if they are > + * still running in the same process group. Any program that wants to > + * continue running after the user's window manager session is gone > + * should create its own process group. > + */ > + signal(SIGHUP, SIG_IGN); > + signal(SIGTERM, SIG_IGN); > + kill(0, SIGHUP); > + sleep(4); > + kill(0, SIGTERM); > + > exit(0); > }
That patch may cause a lot of trouble if X does not exit when fvwm does. For example, I often have these two lines near the end of my .xinitrc: # start fvwm without any config file fvwm2 -f /dev/null # fall back to normal config file after exiting fvwm2 Also, this fails miserably if you restart fvwm in the mean time since the new fvwm process does not become the parent of the windows. Neither does it help if windows are started from outside of fvwm, e.g. from .xinitrc. Why don't you simply do this in .xinitrc? For example, since netscape often hangs, I have killall -15 netscape as the last line. I'd only do this for applications that tend to hang, not Bye Dominik ^_^ ^_^ -- Dominik Vogt, email: [EMAIL PROTECTED] LifeBits Aktiengesellschaft, Albrechtstr. 9, D-72072 Tuebingen fon: ++49 (0) 7071/7965-0, fax: ++49 (0) 7071/7965-20 -- Visit the official FVWM web page at <URL:http://www.fvwm.org/>. To unsubscribe from the list, send "unsubscribe fvwm-workers" in the body of a message to [EMAIL PROTECTED] To report problems, send mail to [EMAIL PROTECTED]