Commit e46ae279 authored by Alexandre Duret-Lutz's avatar Alexandre Duret-Lutz
Browse files

ltlcheck: use kill instead of killpg

kill(-x,y) is more portable than killpg(x,y)

* src/bin/ltlcheck.cc: Use kill.
parent a62a0467
......@@ -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;
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment