ltlcheck: use kill instead of killpg
kill(-x,y) is more portable than killpg(x,y) * src/bin/ltlcheck.cc: Use kill.
This commit is contained in:
parent
a62a04670c
commit
e46ae2799f
1 changed files with 3 additions and 3 deletions
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue