Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
SIG_DFL handling
#1
I have a question on what happens when a signal (eg: SIGTERM) has the default signal handler (SIG_DFL)

Situation: I want to add my own *additional* signal handlers to a signal. But I don't want to cause any unintended consequences.

The question is if SIG_DFL implies some sort of default system behavior (handled by the python interpreter or the OS itself). If it does, then my signal handler needs to do my own thing, then restore SIG_DFL and reraise.

If SIG_DFL means that the behavior is not set (and won't do anything important), then there is no need for me to restore SIG_DFL and re-raise.

Any insight?
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
Star python exception handling handling .... with traceback mg24 3 1,216 Nov-09-2022, 07:29 PM
Last Post: Gribouillis

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020