SIGHUP and Program Flow in a 6.2 Application

Martin McCormick martin at dc.cis.okstate.edu
Wed Mar 5 21:26:34 UTC 2008


	A SIGHUP signal to a running process needs a signal
handler like

signal( SIGHUP ,startlogging);

	What sort of end statement needs to be in the function
called to allow program execution to resume back in the main
caller?

	I had put a return; statement in the function and
noticed that things were wrong after the application stopped
catching the SIGHUP after the first call.

	A gdb trace shows that the signal causes a branch to the
code pointed to by the signal statement. The code runs and then
if it reaches the return; statement, the flow is lost and knows
not where to go next.

	Thank you.


Martin McCormick WB5AGZ  Stillwater, OK 
Systems Engineer
OSU Information Technology Department Network Operations Group


More information about the freebsd-questions mailing list