[LCP]Signal handler question

Andrew Weaver Andrew.Weaver at tecnomen.fi
Thu Oct 4 16:16:58 UTC 2001


Basically, once your sig handler is hit, you are in the signal "thread".
Anything you do before returning is under the rules/restrictions of signal
handling.

> -----Original Message-----
> From:	David Filion [SMTP:filioda at videotron.com]
> Sent:	Wednesday, October 03, 2001 7:41 PM
> To:	linuxcprogramming at lists.linux.org.au
> Subject:	[LCP]Signal handler question
> 
> 
> 
> 
> I'm working a program that needs to do a "clean" shutdown when it catches
> certain signals.  (One of the items is to disconnect cleanly from a DB.)
> Now,
> because I'm limited in the commands/calls I can use in a signal handler I
> was
> thinking of using a siglongjmp to return to main() then call my cleanup
> function/exit routine.    Does anyone know if I'll still be limited to the
> "safe" list of signal commands after I jump or will I be able to use the
> full
> set again in my cleanup function?
> 
> 
> 
> _______________________________________________
> This is the Linux C Programming List
> :  http://lists.linux.org.au/listinfo/linuxcprogramming List



More information about the linuxCprogramming mailing list