Synopsis:
task_clrdefer()
Arguments:
none
Description: This call is resets the task_defersig() counter back to zero thus allowing hangup signals to cause jumps to onsignal again. If a hangup signal had already been received then this function will not return and a jump to onsignal will occur immediately.
This is often used where an non-recoverable error has been received and the programmer wishes to jump immediately to onsignal to disconnect the caller.
For example:
func f()
task_defersig(“(“);
x=do_something_important();
// check for non-recoverable error.
if (x < 0)
// can’t recover so….
// First clear all signal defers (there maybe
// some nested calls outside this function)
task_clrdefer();
// send a hangup signal to self to force jump to onsignal
task_hangup(task_getpid());
endif
…
task_defersig(“)”);
end
Return Value:
Returns the empty string “”.