Module Name: src
Committed By: pooka
Date: Wed Jan 12 11:12:26 UTC 2011
Modified Files:
src/tests/rump/rumpkern/h_client: h_stresscli.c
Log Message:
Establish signal handler already in parent. Otherwise the child
might be killed before it has a chance to run.
To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/tests/rump/rumpkern/h_client/h_stresscli.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/tests/rump/rumpkern/h_client/h_stresscli.c
diff -u src/tests/rump/rumpkern/h_client/h_stresscli.c:1.5 src/tests/rump/rumpkern/h_client/h_stresscli.c:1.6
--- src/tests/rump/rumpkern/h_client/h_stresscli.c:1.5 Tue Jan 11 11:26:28 2011
+++ src/tests/rump/rumpkern/h_client/h_stresscli.c Wed Jan 12 11:12:25 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: h_stresscli.c,v 1.5 2011/01/11 11:26:28 pooka Exp $ */
+/* $NetBSD: h_stresscli.c,v 1.6 2011/01/12 11:12:25 pooka Exp $ */
#include <sys/types.h>
#include <sys/atomic.h>
@@ -75,6 +75,8 @@
if (argc != 2)
errx(1, "need roundcount");
+ signal(SIGUSR1, signaali);
+
memset(clis, 0, sizeof(clis));
for (rounds = 1; rounds < atoi(argv[1])*10; rounds++) {
while (ncli < NCLI) {
@@ -92,8 +94,6 @@
hostnamebuf, strlen(hostnamebuf)+1) == -1)
err(1, "sethostname");
- signal(SIGUSR1, signaali);
-
for (j = 0; j < NTHR-1; j++)
if (pthread_create(&pt[j], NULL,
client, NULL) != 0)