lkml.org 
[lkml]   [2004]   [May]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: signal handling issue.
On Tue, 18 May 2004, Alex Davis wrote:

> There appears to be a change between linux 2.4 and 2.6
> in how signals are handled. As a test, I wrote the program
> below:
>
> #include <stdio.h>
> #include <signal.h>
> #include <setjmp.h>
>
> static jmp_buf env;
>
> static void handler(int s) {
> printf("caught signal %d\n", s);
> longjmp(env, 1);
> }

[SNIPPED...]

A a couple years ago they changed the rules. You can't longjmp
from a signal handler anymore. There's some other function
call with 'sig' in it, like siglongjmp or something like
that. Ahh... here it is:

/usr/include/setjmp.h:extern void siglongjmp __P ((sigjmp_buf __env, int __val))


Cheers,
Dick Johnson
Penguin : Linux version 2.4.26 on an i686 machine (5557.45 BogoMips).
Note 96.31% of all statistics are fiction.


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:03    [W:0.032 / U:0.044 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site