From 4e3ca10b13b03b01fda2233b88c827019a69bfee Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 29 Oct 2003 04:21:58 +0000 Subject: much better synchronised startup in smbtorture - this allows us to run massive NBENCH runs without killing the client (This used to be commit 3f20041bb930ff1e4d9c0709008174faa5f690d5) --- source4/torture/torture.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'source4/torture/torture.c') diff --git a/source4/torture/torture.c b/source4/torture/torture.c index 21c0647282..eccc6e5d11 100644 --- a/source4/torture/torture.c +++ b/source4/torture/torture.c @@ -3834,6 +3834,10 @@ static BOOL torture_rpc_open(int dummy) return True; } +static void sigcont(void) +{ +} + static double create_procs(BOOL (*fn)(int), BOOL *result) { int i, status; @@ -3845,6 +3849,8 @@ static double create_procs(BOOL (*fn)(int), BOOL *result) synccount = 0; + signal(SIGCONT, sigcont); + child_status = (volatile pid_t *)shm_setup(sizeof(pid_t)*nprocs); if (!child_status) { printf("Failed to setup shared memory\n"); @@ -3886,7 +3892,7 @@ static double create_procs(BOOL (*fn)(int), BOOL *result) child_status[i] = getpid(); - while (child_status[i] && end_timer() < start_time_limit) msleep(100); + pause(); if (child_status[i]) { printf("Child %d failed to start!\n", i); @@ -3918,10 +3924,10 @@ static double create_procs(BOOL (*fn)(int), BOOL *result) /* start the client load */ start_timer(); - for (i=0;i