projects
/
apps
/
pfixtools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix SIGINT in the blocking mode for linux.
[apps/pfixtools.git]
/
main-postlicyd.c
diff --git
a/main-postlicyd.c
b/main-postlicyd.c
index
ff5097f
..
57633d3
100644
(file)
--- a/
main-postlicyd.c
+++ b/
main-postlicyd.c
@@
-228,9
+228,14
@@
static void *policy_run(int fd, void *data)
static int main_initialize(void)
{
static int main_initialize(void)
{
+ struct sigaction sa;
+
openlog("postlicyd", LOG_PID, LOG_MAIL);
signal(SIGPIPE, SIG_IGN);
openlog("postlicyd", LOG_PID, LOG_MAIL);
signal(SIGPIPE, SIG_IGN);
- signal(SIGINT, &common_sighandler);
+ sigaction(SIGINT, NULL, &sa);
+ sa.sa_handler = &common_sighandler;
+ sa.sa_flags &= ~SA_RESTART;
+ sigaction(SIGINT, &sa, NULL);
signal(SIGTERM, &common_sighandler);
signal(SIGHUP, &common_sighandler);
signal(SIGSEGV, &common_sighandler);
signal(SIGTERM, &common_sighandler);
signal(SIGHUP, &common_sighandler);
signal(SIGSEGV, &common_sighandler);