This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: __attribute__((cleanup(function)) versus try/finally
Andrew Haley wrote:
> > 1. Linux does not care if the signal handler returns or not (unlike
> > Windows).
>
> Actually, the C standard is quite explicit about this: signal handlers
> may return either by a return statement of calling longjmp(). Maybe
> the Windows version of longjmp() does some magic to make this work.
Last time I tried it (a few years ago now), longjmp() out of a signal
handler which is interrupting a select() system call crashed Cygwin.
So, I had to use a different strategy for picking up SIGCHLD events on
that platform - limiting select() calls to a maximum timeout of a few
seconds.
-- Jamie