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

termio: killpg expected to fail on darwin, still go into waitpid loop #2277

Merged
merged 1 commit into from
Sep 21, 2024

Conversation

mitchellh
Copy link
Contributor

@mitchellh mitchellh commented Sep 20, 2024

Fixes #2273

On macOS, killpg is expected to fail with EPERM because of the way we launch a login process around it. Before this commit, this caused us to never call waitpid and reap the child process, which caused the child process to stick around as a zombie.

This commit allows killpg to fail with EPERM on macOS and fall through to waitpid.

Note: posix process management is a topic that often confuses me so I might have this general logic wrong. If any experts have insight into making this more robust I'd love to hear it.

Fixes #2273

On macOS, killpg is expected to fail with EPERM because of the way we
launch a login process around it. Before this commit, this caused us to
never call waitpid and reap the child process, which caused the child
process to stick around as a zombie.

This commit allows killpg to fail with EPERM on macOS and fall through
to waitpid.
@mitchellh mitchellh merged commit 5af3d84 into main Sep 21, 2024
34 checks passed
@mitchellh mitchellh deleted the kill branch September 21, 2024 01:58
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.

macOS: login processes not reaped from closed surfaces
1 participant