From 1325a030509f252ba77c1b6787c18d774513bac0 Mon Sep 17 00:00:00 2001 From: crupest Date: Mon, 6 Feb 2023 00:14:55 +0800 Subject: import(life): Fix linux run bug. --- works/life/linux-run/linux-run.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'works/life') diff --git a/works/life/linux-run/linux-run.cpp b/works/life/linux-run/linux-run.cpp index e656e55..dcb9944 100644 --- a/works/life/linux-run/linux-run.cpp +++ b/works/life/linux-run/linux-run.cpp @@ -131,6 +131,7 @@ void run(const std::string &program, std::vector 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) { -- cgit v1.2.3