Skip to content

protect WrapCGI against SIGCHLD handlers#596

Merged
miyagawa merged 1 commit intoplack:masterfrom
dakkar:protect-against-sigchld-handlers
Jul 24, 2017
Merged

protect WrapCGI against SIGCHLD handlers#596
miyagawa merged 1 commit intoplack:masterfrom
dakkar:protect-against-sigchld-handlers

Conversation

@dakkar
Copy link
Copy Markdown

@dakkar dakkar commented Jul 24, 2017

If $SIG{CHLD} is set to 'IGNORE', or to a "reaper" coderef, WrapCGI (in "execute" mode) stalls in a tight loop when the CGI exits, because waitpid returns -1 instead of the positive pid it would usually return.

This patch fixes that (and tests that it works)

If `$SIG{CHLD}` is set to `'IGNORE'`, or to a "reaper" coderef,
`WrapCGI` (in "execute" mode) stalls in a tight loop when the CGI
exits, because `waitpid` returns -1 instead of the positive pid it
would usually return.

This patch fixes that (and tests that it works)
@miyagawa miyagawa merged commit b54184b into plack:master Jul 24, 2017
@miyagawa
Copy link
Copy Markdown
Member

Thanks!

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.

2 participants