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

Open
#447 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
38/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
cpp

Research direction

Start by running the two linked Compiler Explorer examples on Linux with Boost 1.86 or 1.87, comparing execution of the existing and non-existing files. Trace the process-constructor path and exception handling to determine why the forked child is not reaped; done means the missing-file case no longer leaves a zombie while still throwing the expected exception.

Written by the indexing model from the issue text.

Description

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.

Dominant language
C++
Stars
145
Forks
151
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from boostorg/process

All issues in boostorg/process

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.