Skip to content

Commit

Permalink
nginx: Set sa_handler to wrapped signal handler
Browse files Browse the repository at this point in the history
The nginx demo was previously not using the signal handler we defined so this
fixes that. Before we were rewriting source files in-place, sa_handler was set
to ngx_timer_signal_handler (i.e. the unwrapped version) by the git patch. After
we switched to writing sources to an output directory, I copied what the patch
was doing by adding an IA2_IGNORE but it should have been set to the signal
handler we defined.
  • Loading branch information
ayrtonm committed Aug 31, 2023
1 parent fe9335d commit 7d25aba
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion external/nginx/src/event/ngx_event.c
Original file line number Diff line number Diff line change
Expand Up @@ -684,7 +684,7 @@ ngx_event_process_init(ngx_cycle_t *cycle)
struct itimerval itv;

ngx_memzero(&sa, sizeof(struct sigaction));
sa.sa_handler = IA2_IGNORE(ngx_timer_signal_handler);
sa.sa_handler = IA2_SIGHANDLER(ngx_timer_signal_handler);
sigemptyset(&sa.sa_mask);

if (sigaction(SIGALRM, &sa, NULL) == -1) {
Expand Down

0 comments on commit 7d25aba

Please sign in to comment.