Test the availability of SA_RESTART and use it conditionally.
This commit is contained in:
1 parent
362aa05fd2
commit
0f9206d36c
6 files changed
+23
No files matched your search
@@ -157,7 +157,9 @@ int main(int argc, char **argv)
|
||||
|
||||
/* setup signal handlers for common signals */
|
||||
sigemptyset(&sa.sa_mask);
|
||||
#ifdef HAVE_SA_RESTART
|
||||
sa.sa_flags = SA_RESTART;
|
||||
#endif
|
||||
sa.sa_handler = exit_program;
|
||||
sigaction(SIGINT, &sa, NULL); // Ctrl-C
|
||||
sigaction(SIGTERM, &sa, NULL); // "regular" kill
|
||||
|
||||
Reference in new issue
Block a user