Skip to content

extra pthread handling#2390

Draft
henderkes wants to merge 2 commits intomainfrom
feat/fork-support
Draft

extra pthread handling#2390
henderkes wants to merge 2 commits intomainfrom
feat/fork-support

Conversation

@henderkes
Copy link
Copy Markdown
Contributor

unlikely to be needed, but better safe than sorry

unlikely to be needed, but better safe than sorry
Comment thread frankenphp.c
static void frankenphp_fork_child(void) {
is_forked_child = true;
#ifdef __linux__
prctl(PR_SET_PDEATHSIG, SIGKILL, 0, 0, 0);
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think there's an equivalent to this in macOS or BSD?

realistically speaking, it's hard to imagine this ever kicks in if a php object destructor waits on the child pid, but in case the php runtime throws an unrecoverable error in a destructor, it might exit the thread without calling the destructor responsible for signalling and cleaning up the child

@henderkes henderkes force-pushed the feat/fork-support branch from cdb8a37 to 1f2963e Compare May 4, 2026 07:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant