svn commit: r221068 - projects/portbuild/sources
Florent Thoumie
flz at FreeBSD.org
Tue Apr 26 15:11:14 UTC 2011
Author: flz
Date: Tue Apr 26 15:11:13 2011
New Revision: 221068
URL: http://svn.freebsd.org/changeset/base/221068
Log:
portbuild: use SIGKILL for ptimeout/pnohang.
As requested by Pav.
Modified:
projects/portbuild/sources/pnohang.c
projects/portbuild/sources/ptimeout.c
Modified: projects/portbuild/sources/pnohang.c
==============================================================================
--- projects/portbuild/sources/pnohang.c Tue Apr 26 15:11:12 2011 (r221067)
+++ projects/portbuild/sources/pnohang.c Tue Apr 26 15:11:13 2011 (r221068)
@@ -70,7 +70,7 @@ main(int argc, char *argv[])
sv.sa_handler = SIG_IGN;
sigemptyset(&sv.sa_mask);
sv.sa_flags = 0;
- sigaction(SIGTERM, &sv, 0);
+ sigaction(SIGKILL, &sv, 0);
/* parent */
child = wait(&status);
@@ -78,10 +78,10 @@ main(int argc, char *argv[])
if (pid1 == child) {
DPRINTF("killing process %d (second child)\n", pid2);
- kill(pid2, SIGTERM);
+ kill(pid2, SIGKILL);
} else {
DPRINTF("killing process %d (first child)\n", pid1);
- kill(pid1, SIGTERM);
+ kill(pid1, SIGKILL);
}
/* exit status in upper 8 bits, killed signal (if any) in
* lower 8 bits
@@ -98,9 +98,9 @@ main(int argc, char *argv[])
printf("ps jgx before the signal\n");
system("ps jgxww");
sleep(1); /* give it a chance to output the message */
- kill(pid1, SIGTERM);
+ kill(pid1, SIGKILL);
sleep(1);
- kill(pid, SIGTERM);
+ kill(pid, SIGKILL);
sleep(1);
system("ps jgxww");
exit(1);
Modified: projects/portbuild/sources/ptimeout.c
==============================================================================
--- projects/portbuild/sources/ptimeout.c Tue Apr 26 15:11:12 2011 (r221067)
+++ projects/portbuild/sources/ptimeout.c Tue Apr 26 15:11:13 2011 (r221068)
@@ -56,7 +56,7 @@ main(int argc, char *argv[])
kill(pid2, SIGKILL);
} else {
DPRINTF("killing process %d\n", pid1);
- kill(pid1, SIGTERM);
+ kill(pid1, SIGKILL);
}
/* exit status in upper 8 bits, killed signal (if any)
* in lower 8 bits
@@ -67,7 +67,7 @@ main(int argc, char *argv[])
sleep(timeout);
t = time(NULL);
printf("ptimeout: killing %s (pid %d) since timeout of %d expired at %s", args, pid1, timeout, ctime(&t));
- kill(pid1, SIGTERM);
+ kill(pid1, SIGKILL);
exit(1);
}
} else {
More information about the svn-src-projects
mailing list