=== modified file 'plugins.d/mandos-client.c' --- plugins.d/mandos-client.c 2009-09-17 03:21:20 +0000 +++ plugins.d/mandos-client.c 2009-09-17 11:22:28 +0000 @@ -44,7 +44,7 @@ #include /* uint16_t, uint32_t */ #include /* NULL, size_t, ssize_t */ #include /* free(), EXIT_SUCCESS, EXIT_FAILURE, - srand(), strtof() */ + srand(), strtof(), abort() */ #include /* bool, false, true */ #include /* memset(), strcmp(), strlen(), strerror(), asprintf(), strcpy() */ @@ -72,7 +72,7 @@ */ #include /* close(), SEEK_SET, off_t, write(), getuid(), getgid(), seteuid(), - setgid() */ + setgid(), pause() */ #include /* inet_pton(), htons */ #include /* not, or, and */ #include /* struct argp_option, error_t, struct @@ -1596,11 +1596,20 @@ if(quit_now){ sigemptyset(&old_sigterm_action.sa_mask); old_sigterm_action.sa_handler = SIG_DFL; - ret = sigaction(signal_received, &old_sigterm_action, NULL); + ret = (int)TEMP_FAILURE_RETRY(sigaction(signal_received, + &old_sigterm_action, + NULL)); if(ret == -1){ perror("sigaction"); } - raise(signal_received); + do { + ret = raise(signal_received); + } while(ret != 0 and errno == EINTR); + if(ret != 0){ + perror("raise"); + abort(); + } + TEMP_FAILURE_RETRY(pause()); } return exitcode;