diff options
author | Andrew Tridgell <tridge@samba.org> | 2003-10-29 04:21:58 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2003-10-29 04:21:58 +0000 |
commit | 4e3ca10b13b03b01fda2233b88c827019a69bfee (patch) | |
tree | ed831940019d2a39b10ffbc1dd4aa12ab9240344 /source4/torture/torture.c | |
parent | 9182f0e6c5fd839acc42ae5e75402885dbefb1a6 (diff) | |
download | samba-4e3ca10b13b03b01fda2233b88c827019a69bfee.tar.gz samba-4e3ca10b13b03b01fda2233b88c827019a69bfee.tar.bz2 samba-4e3ca10b13b03b01fda2233b88c827019a69bfee.zip |
much better synchronised startup in smbtorture - this allows us to run
massive NBENCH runs without killing the client
(This used to be commit 3f20041bb930ff1e4d9c0709008174faa5f690d5)
Diffstat (limited to 'source4/torture/torture.c')
-rw-r--r-- | source4/torture/torture.c | 10 |
1 files changed, 8 insertions, 2 deletions
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<nprocs;i++) { child_status[i] = 0; } + kill(0, SIGCONT); printf("%d clients started\n", nprocs); |