Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/tests/rump/rumpkern/h_client Establish signal handler alread...
details: https://anonhg.NetBSD.org/src/rev/21ce9daad6d7
branches: trunk
changeset: 760730:21ce9daad6d7
user: pooka <pooka%NetBSD.org@localhost>
date: Wed Jan 12 11:12:25 2011 +0000
description:
Establish signal handler already in parent. Otherwise the child
might be killed before it has a chance to run.
diffstat:
tests/rump/rumpkern/h_client/h_stresscli.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (27 lines):
diff -r e4a38992c906 -r 21ce9daad6d7 tests/rump/rumpkern/h_client/h_stresscli.c
--- a/tests/rump/rumpkern/h_client/h_stresscli.c Wed Jan 12 09:11:54 2011 +0000
+++ b/tests/rump/rumpkern/h_client/h_stresscli.c Wed Jan 12 11:12:25 2011 +0000
@@ -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)
Home |
Main Index |
Thread Index |
Old Index