When/How to reset trap
I have a script in which I set off sigalrm (14) in a background subscript that kills itself.
Currently I trap for sigalrm prior to entering a forever loop which calls a function to set off the alarm again.
I think I should be resetting the trap command within the loop but am not sure from the documentation.
Should I place a trap <go-to-function> SIGALRM within the loop or should I just reset it in the loop with trap 14?
It is not clear from the man page if reset would use <go-to-function> as the default. If not what is the default destination of the ALRM trap when reset without a user specified destination? Just trying to clarify this trap command, thanks.
Last edited by waddles; 11-17-2013 at 06:49 PM.