[omniORB] RE: Catching SIGTERM/SIGHUP using omniORB v3.0

Mark Johnson mark.johnson@onfiber.com
Fri, 14 Sep 2001 15:19:47 -0500


Nevermind, I think I got if figured out.... I had been looking at it too
long...

> -----Original Message-----
> From: Mark Johnson 
> Sent: Friday, September 14, 2001 3:07 PM
> To: OmniOrb Mailing List (E-mail)
> Subject: Catching SIGTERM/SIGHUP using omniORB v3.0
> 
> 
> ENV: Solaris 2.8, CC, omniORB3.0
> 
> I'm trying to catch SIGTERM and SIGHUP but I don't seem to be 
> getting them.  Is there anything special that I need to do to 
> get these to work? I tried to see if any of the examples that 
> came with the distribution came with an example of using 
> signals but all I found were ones for threading...
> 
> Typically, I do something like this:
> 
> #include <signal.h>
> extern "C"
> {
>    void CloseController(int sig)
>    {
>       signal(sig, CloseController);
> 	// ... etc ... 
>    }
>    void ReloadController(int sig)
>    {
>       signal(sig, ReloadController);
> 	// ... etc ... 
>    }
> }
> int main( int argc, char * argv[] )
> {
> 	// ... etc ...
>    signal( SIGTERM, CloseController );
>    signal( SIGINT,  CloseController );
>    signal( SIGHUP,  ReloadController );
> 	// ... etc ...
> 
>    return 0;
> }
>