Search code examples
clinuxunixsignals

UNIX: Is there an opposite for the SIG_IGN?


Hello I am making a program in c and I need to make a signal(SIGINT, SIG_IGN); but I need then at a certain point in the code to stop ignoring those signals, is there something like that?


Solution

  • You can set a signal to use its default signal handling by passing SIG_DFL to signal.

    signal(SIGINT, SIG_DFL);