[OPEN-ILS-DEV] PATCH: osrf_router_main.c (miscellaneous)

Scott McKellar mck9 at swbell.net
Fri Jan 11 09:15:37 EST 2008


--- Scott McKellar <mck9 at swbell.net> wrote:

> 3. I renamed the parameter to routerSignalHandler() from "signal"
> to "signo", since "signal" is a reserved identifier.  I also added
> some code to re-raise the signal caught.
> This approach presumably achieves the intended objective of 
> terminating the program, but not in the best way possible.

<snip>

> I chose instead to terminate the program by re-raising the signal.
> That way the parent process has a chance to detect that the program
> was terminated by a signal rather than by a normal return.

After posting this I realized that the router program runs as a 
daemon, and its adopted parent process doesn't care whether it
terminates by a signal or by a normal return.  So there's not
much point in re-raising the signal.

It remains true that the signal handler should contrive to
terminate the program, either by exiting or by setting a flag that
the rest of the program tests.

Scott McKellar
http://home.swbell.net/mck9/ct/



More information about the Open-ils-dev mailing list