Subject: Module "KillMe" command patch

From: [email-masked]
Date: Thu, 06 Jun 1996 10:06:56 -0400

Just wanting to report that the "KillMe" module command patch that I posted a 
while back to the fvwm list definitely solves the fvwm-race-on-tkgoodstuff-rest
arting problem, and to add a plea to incorporate it in the main release.  It 
is very small and I think obviously harmless, and it is a big deal for 
tkgoodstuff, because it allows the user to reconfigure tkgoodstuff and restart 
it without restarting fvwm.  Recall that the problem is that when a module 
leaves children when exiting, fvwm doesn't recognize that it has died, and 
races trying to write to the "full" pipe.  The fix is to let the module tell 
fvwm to kill it, rather than just exiting.  Here is the patch, in case it was 
lost in all my bug-hunting reports:

*** ../fvwm-2.0.42/fvwm/module.c	Tue Apr  2 11:53:31 1996
--- fvwm/module.c	Mon May 27 11:53:28 1996
***************
*** 304,309 ****
--- 304,315 ----
        extern int Context;
        FvwmWindow *tmp_win;
  
+       if(mystrncasecmp(text,"KillMe",6)==0) 
+ 	{
+           KillModule(channel,12);
+           return;
+ 	}
+ 
        /* If a module does XUngrabPointer(), it can now get proper Popups */
        if(mystrncasecmp(text,"popup",5)==0)
  	  Event.xany.type = ButtonPress;

Thanks for considering it!

Cheers,
Mark

--
Visit the official FVWM web page at <URL:http://www.hpc.uh.edu/fvwm/>.
To unsubscribe from the list, send "unsubscribe fvwm-workers" in the
body of a message to [email-masked].
To report problems, send mail to [email-masked].

---

From: <[email-masked]> (Charles Hines)
Date: Thu, 6 Jun 1996 11:20:06 -0400

>>>>> "mark" == mark crimmins <[email-masked]> writes:

mark> Just wanting to report that the "KillMe" module command patch
mark> that I posted a while back to the fvwm list definitely solves
mark> the fvwm-race-on-tkgoodstuff-rest arting problem, and to add a
mark> plea to incorporate it in the main release.  It is very small
mark> and I think obviously harmless, and it is a big deal for
mark> tkgoodstuff, because it allows the user to reconfigure
mark> tkgoodstuff and restart it without restarting fvwm.  Recall that
mark> the problem is that when a module leaves children when exiting,
mark> fvwm doesn't recognize that it has died, and races trying to
mark> write to the "full" pipe.  The fix is to let the module tell
mark> fvwm to kill it, rather than just exiting.  Here is the patch,
mark> in case it was lost in all my bug-hunting reports:
....
mark> Thanks for considering it!

Sure, I'll put it in 2.0.43 since, as you noted, it harms nothing.
I'll also try investigating if there is a way around this without
using KillMe.

Chuck