B
BigCalm
I'm currently modifying a daemon (on AIX unix) which is primarily C
source. At the moment, the daemon sleeps 30 seconds before checking
if it has anything to do, but I'd like to improve this so that
something else can trigger it to wake up immediately.
I can handle the wake-up code, it's the signalling that's giving me
headaches - I'm not sure what the best way of doing it?
Should I trap a certain signal sent to the process, (say SIGUSR1)?
Only problem with this is that I can't signal from anyone else except
the owner of the daemon or root. Can I set the process so that it can
be signalled by anyone?
Should I use shared memory and check it every second or so?
Or some kind of interrupt?
Thanks
- Jon
source. At the moment, the daemon sleeps 30 seconds before checking
if it has anything to do, but I'd like to improve this so that
something else can trigger it to wake up immediately.
I can handle the wake-up code, it's the signalling that's giving me
headaches - I'm not sure what the best way of doing it?
Should I trap a certain signal sent to the process, (say SIGUSR1)?
Only problem with this is that I can't signal from anyone else except
the owner of the daemon or root. Can I set the process so that it can
be signalled by anyone?
Should I use shared memory and check it every second or so?
Or some kind of interrupt?
Thanks
- Jon