|
#pragma map(action, "PROGA") #pragma linkage(action, OS)
jmp_buf jumper; void action (......)
void signal_handler (int signum) { longjmp(jumper, 1); }
int main(int argc, const char **argv) { struct sigaction act, old;
/* Set up the signal handler */ act.sa_handler = signal_handler; act.sa_flags = 0; sigemptyset (&act.sa_mask); sigaction (SIGSEGV, &act, &old);
if (setjmp(jumper) != 0){ sigaction (SIGSEGV, &old, NULL); printf("General error: SIGSEGV occured"); // allways return with success return EXIT_SUCCESS; }
// CALL RPG program here action (...) ; }
Thanks in advance.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.