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

Trying to run a non-existing file in Linux results in a zombie process #447

Open
cmorve-te opened this issue Jan 9, 2025 · 1 comment
Open

Comments

@cmorve-te
Copy link

As can be seen in https://godbolt.org/z/4T7TMMTov, calling the process constructor on Linux (have not checked different launchers) asking it to execute a non-existing file results on a exception being thrown and the forked process never being reaped.

For comparison, https://godbolt.org/z/W94K31sGW uses an existing file and it works fine.

Those use Boost 1.86 since that's the latest available in Godbolt today, but I have reproduced the same issue on 1.87.

@cmorve-te
Copy link
Author

A ::waitpid(pid, nullptr, 0); before/after

detail::on_error(*this, executable, argv, ec, inits...);
fixes the problem for me. But I will let you create a proper fix.

klemens-morgenstern added a commit that referenced this issue Jan 13, 2025
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

No branches or pull requests

1 participant