diff options
author | crupest <crupest@outlook.com> | 2023-02-06 00:14:55 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2023-02-06 00:14:55 +0800 |
commit | 9322433fa910acace9b6bd1687cabde25f7c14f9 (patch) | |
tree | 7e76ac632dd88091cd3a071cb64118f27e32347e /linux-run | |
parent | 7d41d457fe6e7433df030b4e5a3ae59093ad929d (diff) | |
download | life-9322433fa910acace9b6bd1687cabde25f7c14f9.tar.gz life-9322433fa910acace9b6bd1687cabde25f7c14f9.tar.bz2 life-9322433fa910acace9b6bd1687cabde25f7c14f9.zip |
Fix linux run bug.
Diffstat (limited to 'linux-run')
-rw-r--r-- | linux-run/linux-run.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/linux-run/linux-run.cpp b/linux-run/linux-run.cpp index e656e55..dcb9944 100644 --- a/linux-run/linux-run.cpp +++ b/linux-run/linux-run.cpp @@ -131,6 +131,7 @@ void run(const std::string &program, std::vector<std::string> arguments, int poll_return = poll(&sigchld_poll, 1, timeout_value); if (poll_return == 0) { + kill(pid, SIGKILL); throw TimeoutError("Timeout to run command."); } else if (poll_return == -1) { if (errno == EINTR) { |