Skip to content
This repository has been archived by the owner on Sep 18, 2023. It is now read-only.

Commit

Permalink
Renaming shutdown signal handler to exit_signal (libc conflict)
Browse files Browse the repository at this point in the history
  • Loading branch information
lutoma committed Jun 9, 2012
1 parent 527269d commit 4b2db53
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions main.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ void usage(char* argv[])
exit(EXIT_FAILURE);
}

void shutdown()
void exit_signal()
{
syslog(LOG_INFO, "Catched one of SIG{TERM,INT, HUP}, killing workers!\n");
for(int i = 0; i <= num_workers; i++)
Expand Down Expand Up @@ -163,8 +163,8 @@ int main(int argc, char* argv[], char* envp[])
* workers died (not cool).
*/
struct sigaction exit_action;
exit_action.sa_handler = &shutdown;
exit_action.sa_sigaction = &shutdown;
exit_action.sa_handler = &exit_signal;
exit_action.sa_sigaction = &exit_signal;

struct sigaction worker_died_action;
worker_died_action.sa_handler = &worker_died;
Expand Down

0 comments on commit 4b2db53

Please sign in to comment.