Skip to content
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

Pdeathsig #182

Open
AkihiroSuda opened this issue Oct 22, 2020 · 0 comments
Open

Pdeathsig #182

AkihiroSuda opened this issue Oct 22, 2020 · 0 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@AkihiroSuda
Copy link
Member

The usage of Pdeathsig in #66 isn't quite right. It will guarantee that the child dies, but it won't ensure that the parent doesn't accidentally kill the child. See golang/go#27505 for details.

The correct way to use Pdeathsig would be to launch a goroutine, lock it to the OS thread, start the child in that goroutine, and don't exit the goroutine until the child exits. There's a more complete example in the issue I linked above.

FWIW, if you're launching lots of children, it might make sense to use a single goroutine locked to an OS thread to launch all of the potential children.

Originally posted by @virtuald in #65 (comment)

@AkihiroSuda AkihiroSuda added bug Something isn't working help wanted Extra attention is needed labels Oct 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant