Kaydet (Commit) 6e2d3ecf authored tarafından Bahadır Kandemir's avatar Bahadır Kandemir

handle sigint

üst 6a15c957
......@@ -49,6 +49,7 @@ handle_signals(void)
struct sigaction act;
struct sigaction ign;
struct sigaction dfl;
act.sa_handler = handle_sigterm;
/*! initialize and empty a signal set. Signals are to be blocked while executing handle_sigterm */
......@@ -59,9 +60,13 @@ handle_signals(void)
ign.sa_flags = 0;
dfl.sa_handler = SIG_DFL;
dfl.sa_flags = 0;
sigaction(SIGTERM, &act, NULL);
sigaction(SIGINT, &act, NULL);
sigaction(SIGPIPE, &ign, NULL);
sigaction(SIGINT, &dfl, NULL);
//! Sets process name
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment