07-30-05 07:49 AM
Hi Folks,
I have a daemon code that, after initialization and the installation of
signal handlers (via sigset(2)), enters a for(;;) loop and calls
pause(2).
I'm sending SIGUSR1 and SIGUSR2, via kill() (eg. % kill -16
<daemon_pid> ),
to the daemon to invoke code triggered by the reception of these 2
signals.
What I would also like to do is to use raise(3C) to have the daemon send
SIGUSR1 and SIGUSR2 to itself at a user defined interval, thus invoking
the above code.
Code invocation via pause(2) or raise(3C) has to be separate (ie. I
cannot
call raise(3C) from within the for(;;) loop containing the pause(2)
call.
Nor can I call raise(3C) from within any code executed as a result of a
call from out of pause(2).
The thing is that in the current scenario, the raise(3C) calls will
never
be executed.
I'm working on this locally but I also wanted to put this to the group
to see if anyone had any feedback on the above.
Thanks,
Josh.
[ Post a follow-up to this message ]
|