Subject: RE: Signal handling patches

From: "Rankin, Chris" <[email-masked]>
Date: Wed, 6 Jan 1999 17:16:08 -0500

Hi,
	I saw that you've applied the patches: that's great. Of course, the
same thing needs doing to all of the other modules and extras, but I'll do
that when the new signal handling is confirmed and working.

	I should really mention the following:
	PRO: the current strategy is *guaranteed* reentrant because all the
handlers do now is set global flags and then return. The main event loop is
now conditional on these flags. Therefore a signal breaks the event loop and
allows the process to exit normally.
	CON: FVWM will not terminate as soon as it recieves a signal, but
will finish handling the event it received last. This isn't so bad in
itself, but does mean that FVWM *must not block* on any system call once the
"quit" order is given. Hopefully, this small race condition won't affect
anyone in the immediate future.

	The main culprits for blocking (that I've seen) are select() and
XNextEvent(). I have written a wrapper around select() called fvwmSelect()
which CANNOT block once the signal handler sets the "quit" flag. This
routine can hopefully go into libfvwm for v2.2.1. I'm not sure about the
XNextEvent() call; most modules call XPending() first which should reduce
the problem, but I can write another wrapper function if necessary.

	Any feedback welcome,
	Cheers,
	Chris.
--
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].