Even without seeing the details of your itimer, it's easy to see what's happening. A process can only have one alarm set at a time, and calling alarm clobbers any earlier timer.
What condition is it that forces you to restart? Do kids die unexpectedly? Do clients leave connections hanging? Some extra care in the kid's error handling may solve problems like that.
There are several approaches to choose from to remedy this design problem.
After Compline,
Zaxo
In reply to Re: Signal Handling and alarm()
by Zaxo
in thread Signal Handling and alarm()
by gnork
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |