In message <[EMAIL PROTECTED]> on Tue, 03 May 2005 20:46:41 +0200, Johan 
Vromans <[EMAIL PROTECTED]> said:

jvromans> Richard Levitte - VMS Whacker <[EMAIL PROTECTED]> writes:
jvromans> 
jvromans> >  - use sigaction() instead of signal().  It's quite a bit
jvromans> >    more robust, and it's possible to say how a handler
jvromans> >    should be treated.  This needs quite a lot of care.
jvromans> >  - have Restart() set a flag.  This requires a wrapper
jvromans> >    around XNextEvent(), probably using select().
jvromans> >  - something different that I haven't come up with yet.
jvromans> 
jvromans> Apparently, you went for option 2,

Yup.  Option 1 was a red herring, I would have had to implement option
2 either way, since it's not signal safe to call execvp() from within
a signal handler.

jvromans> since I now get an endless flood of "select: Bad address"
jvromans> messages...

Hmm, I did get that in some initial phase, but it went away as my
coding got better.  Basically, the above means select() returned -1
and errno is EBADF, which would mean the X protocol file descriptor is
incorrect.  That's the number returned by ConnectionNumber(), which is
a macro on my system.

Do you have any idea why that happens to you?  Are you willing to dig
a little and figure it out?

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