projects
/
apps
/
pfixtools.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e19b995
)
fix SIGINT in the blocking mode for linux.
author
Pierre Habouzit
<madcoder@debian.org>
Sat, 1 Dec 2007 14:16:51 +0000
(15:16 +0100)
committer
Pierre Habouzit
<madcoder@debian.org>
Sat, 1 Dec 2007 14:16:51 +0000
(15:16 +0100)
Signed-off-by: Pierre Habouzit <madcoder@debian.org>
main-postlicyd.c
patch
|
blob
|
history
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)
{
+ struct sigaction sa;
+
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);