fix: actually kill process if it didn't exit on sigterm

This commit is contained in:
Gabriele Musco 2023-09-09 16:51:08 +02:00
commit f614941e8f
No known key found for this signature in database
GPG key ID: 1068D795C80E51DE

View file

@ -70,7 +70,7 @@ impl JobWorker {
thread::spawn(move || {
sleep(Duration::from_secs(2));
if let Ok(s) = state.lock() {
if s.exited {
if !s.exited {
// process is still alive
kill(pid, SIGKILL).expect("Failed to kill process");
}