Skip to content

Conversation

@chriskuehl
Copy link
Contributor

Fixes #102

We don't currently set the signal mask before forking. If the child process exits very quickly (probably most probable when the child fails to exec, which is the test we saw it in), the parent might receive SIGCHLD before it has set the mask and thus never wait on the child.

Any suggestions on writing tests for this? It's a hard race to force (it takes about 5000 spawns of dumb-init on my machine).

After this change I haven't been able to reproduce after 100,000 spawns. This is also what some other init systems do, such as sinit.

@asottile
Copy link
Contributor

I can't think of a good way to test this, looks good to me though /me merges

@asottile asottile merged commit 74bdd54 into Yelp:master Jul 26, 2016
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