From e46ae2799f19c2e8a8eab7eab3d8a218316fba3b Mon Sep 17 00:00:00 2001 From: Alexandre Duret-Lutz Date: Sun, 14 Oct 2012 09:12:06 +0200 Subject: [PATCH] ltlcheck: use kill instead of killpg kill(-x,y) is more portable than killpg(x,y) * src/bin/ltlcheck.cc: Use kill. --- src/bin/ltlcheck.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/bin/ltlcheck.cc b/src/bin/ltlcheck.cc index 7dd81d8ba..a8e628ccf 100644 --- a/src/bin/ltlcheck.cc +++ b/src/bin/ltlcheck.cc @@ -269,7 +269,7 @@ sig_handler(int sig) if (--alarm_on) { // Send SIGTERM to children. - killpg(child_pid, SIGTERM); + kill(-child_pid, SIGTERM); // Try again later if it didn't work. (alarm() will be reset // if it did work and the call to wait() returns) alarm(2); @@ -277,13 +277,13 @@ sig_handler(int sig) else { // After a few gentle tries, really kill that child. - killpg(child_pid, SIGKILL); + kill(-child_pid, SIGKILL); } } else { // forward signal - killpg(child_pid, sig); + kill(-child_pid, sig); signal_received = sig; } }