diff options
author | Nicolás Reynolds <fauno@endefensadelsl.org> | 2013-12-27 23:55:53 +0000 |
---|---|---|
committer | Nicolás Reynolds <fauno@endefensadelsl.org> | 2013-12-27 23:55:53 +0000 |
commit | 65eeff79fff8a1bfdf67ca51d147384f46f4d5c0 (patch) | |
tree | fbfdff322b28d9a3c37e6e31c94caf1d8e48dac1 /extra/haveged/cleanexit.patch | |
parent | d53c44f055929b18d7d1b25f8367ee5836c435fc (diff) |
Fri Dec 27 23:54:04 UTC 2013
Diffstat (limited to 'extra/haveged/cleanexit.patch')
-rw-r--r-- | extra/haveged/cleanexit.patch | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/extra/haveged/cleanexit.patch b/extra/haveged/cleanexit.patch new file mode 100644 index 000000000..01f8c7f94 --- /dev/null +++ b/extra/haveged/cleanexit.patch @@ -0,0 +1,21 @@ +diff -u -r haveged-1.7c/src/haveged.c haveged-1.7c-cleanexit/src/haveged.c +--- haveged-1.7c/src/haveged.c 2013-01-12 19:20:04.000000000 +0100 ++++ haveged-1.7c-cleanexit/src/haveged.c 2013-11-05 22:40:22.202935493 +0100 +@@ -642,7 +642,16 @@ + static void tidy_exit( /* OUT: nothing */ + int signum) /* IN: signal number */ + { +- error_exit("Stopping due to signal %d\n", signum); ++#ifndef NO_DAEMON ++ if (params->detached!=0) { ++ unlink(params->pid_file); ++ syslog(LOG_INFO, "%s Stopping due to signal %d", params->daemon, signum); ++ } ++ else ++#endif ++ fprintf(stderr, "%s Stopping due to signal %d\n", params->daemon, signum); ++ havege_destroy(handle); ++ exit(0); + } + /** + * send usage display to stderr |