In message <[EMAIL PROTECTED]> on Tue, 03 May 2005 10:35:32 +0200 (CEST), 
Richard Levitte - VMS Whacker <[EMAIL PROTECTED]> said:

richard> In message <[EMAIL PROTECTED]> on Tue, 03 May 2005 10:03:10 +0200, 
Johan Vromans <[EMAIL PROTECTED]> said:
richard> 
richard> jvromans> Well, there's one bug that is still there: sending
richard> jvromans> the HUP signal to ctwm to restart it still only
richard> jvromans> works once.
richard> 
richard> Ah, yeah.  I haven't quite figured that one out.  Anyone care
richard> to help digging into this?

I did a little bit of digging, and the only reason I can figure the
HUP doesn't work after a restart is that the restarted image has it
defaulted to SIG_IGN.  Since the SIGHUP handled is set up using the
following macro, that would explain why HUP on a restarted ctwm
doesn't work:

#define newhandler(sig, action) \
    if (signal (sig, SIG_IGN) != SIG_IGN) (void) signal (sig, action)

Now, if someone could explain to me why that macro is used at all, I'd
be quite grateful.  Is there any reason at all not to set up a new
handler if the previous handler is SIG_IGN?  That looks very error
prone to me...

Cheers,
Richard

-----
Please consider sponsoring my work on free software.
See http://www.free.lp.se/sponsoring.html for details.

-- 
Richard Levitte                         [EMAIL PROTECTED]
                                        http://richard.levitte.org/

"When I became a man I put away childish things, including
 the fear of childishness and the desire to be very grown up."
                                                -- C.S. Lewis

Reply via email to