Skip to content
Permalink
Browse files

Merge pull request #5 from opsmezzo/fix-signals

[fix] Fix signal handling
  • Loading branch information...
mmalecki committed Jul 3, 2013
2 parents 3a7fc2e + fa40a2a commit 8c1d7eadb137854688ab95c6318deccbb62c43be
Showing with 4 additions and 4 deletions.
  1. +4 −4 src/aeternum.c
@@ -115,6 +115,7 @@ void handle_signal(int signal_status) {
if (opts.pidname) {
cleanup_pid_file(opts.pidname);
}
exit(0);
}

int stdio_redirect(char *dest, int fd) {
@@ -155,10 +156,9 @@ int main(int argc, char *argv[]) {
saneopt_t* opt;
char** args;

if (signal (SIGINT, handle_signal) == SIG_IGN)
signal (SIGINT, SIG_IGN);
if (signal (SIGHUP, handle_signal) == SIG_IGN)
signal (SIGHUP, SIG_IGN);
signal(SIGHUP, SIG_IGN);
signal(SIGINT, handle_signal);
signal(SIGTERM, handle_signal);

loop = uv_default_loop();

0 comments on commit 8c1d7ea

Please sign in to comment.
You can’t perform that action at this time.