boostorg / boostorg/process

boost::process::child::terminate() no longer works

Open
#117 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
145
Forks
151
PR merge metrics
No merged PRs in 30d

Description

This test will work with Boost 1.70+, but starting with 1.71 the process will still exist although `running()` says otherwise...

```
TEST(Process, test)
{
boost::process::child c(boost::process::search_path("sleep"), "60");
EXPECT_TRUE(c.running());
const pid_t pid = c.id();
c.terminate();
c.wait();
EXPECT_FALSE(c.running());
}
```

Adding `EXPECT_NE(0, kill(pid, 0));` to the test will highlight the issue.
Also using `kill(pid, SIGKILL)` explicitly in place of `terminate()` will get rid of the process.

The issue happens on CentOS 7, ubuntu 16.04 and ubuntu 19.10.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.