Skip to content

Set SA_ONSTACK too when zend signals are disabled and in pcntl #9758

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Zend/zend_execute_API.c
Original file line number Diff line number Diff line change
Expand Up @@ -1483,7 +1483,7 @@ static void zend_set_timeout_ex(zend_long seconds, bool reset_signals) /* {{{ */

act.sa_handler = zend_timeout_handler;
sigemptyset(&act.sa_mask);
act.sa_flags = SA_RESETHAND | SA_NODEFER;
act.sa_flags = SA_ONSTACK | SA_RESETHAND | SA_NODEFER;
sigaction(signo, &act, NULL);
# else
signal(signo, zend_timeout_handler);
Expand Down
2 changes: 1 addition & 1 deletion ext/pcntl/php_signal.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Sigfunc *php_signal4(int signo, Sigfunc *func, int restart, int mask_all)
} else {
sigemptyset(&act.sa_mask);
}
act.sa_flags = 0;
act.sa_flags = SA_ONSTACK;
#ifdef HAVE_STRUCT_SIGINFO_T
act.sa_flags |= SA_SIGINFO;
#endif
Expand Down