pthread_cleanup_pop() removes the cleanup handler routine at the top of the cancellation cleanup stack of the calling thread and executes it if execute
is non-zero.
When the thread calls pthread_cleanup_pop() with a non-zero execute argument, the argument at the top of the stack is popped and executed. An argument
of 0 pops the handler without executing it.
The Solaris system generates a compile time error if pthread_cleanup_push() does not have a matching pthread-cleanup_pop().
Be aware that using longjmp() or siglongjmp() to jump into or out of a push/pop pair can lead to trouble, as either the matching push or the matching pop statement
might not get executed.
|