Is there a way to check if the current function has been called (directly or indirectly) from a signal handler? For my purpose, this in-signal flag should be preserved across longjmp, siglongjmp, and fork.