summaryrefslogtreecommitdiff
path: root/lib/tdb/tools
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2010-03-14 20:07:58 +0100
committerVolker Lendecke <vl@samba.org>2010-03-22 21:29:21 +0100
commite2c7e5c4f72565fe49265d5b036531926ea1ac92 (patch)
treea3b5ee6407104d669f1c20f2278c19d146f8818b /lib/tdb/tools
parent12f97c0576c8ec6628971aa7f86d7cbc5e304293 (diff)
downloadsamba-e2c7e5c4f72565fe49265d5b036531926ea1ac92.tar.gz
samba-e2c7e5c4f72565fe49265d5b036531926ea1ac92.tar.bz2
samba-e2c7e5c4f72565fe49265d5b036531926ea1ac92.zip
tdb: Fix bug 7248, avoid the nanosleep dependency
Diffstat (limited to 'lib/tdb/tools')
-rw-r--r--lib/tdb/tools/tdbtorture.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/tdb/tools/tdbtorture.c b/lib/tdb/tools/tdbtorture.c
index 5ee6991825..eda79f83d8 100644
--- a/lib/tdb/tools/tdbtorture.c
+++ b/lib/tdb/tools/tdbtorture.c
@@ -355,12 +355,12 @@ int main(int argc, char * const *argv)
pid = waitpid(-1, &status, kill_random ? WNOHANG : 0);
if (pid == 0) {
- struct timespec ts;
+ struct timeval tv;
/* Sleep for 1/10 second. */
- ts.tv_sec = 0;
- ts.tv_nsec = 100000000;
- nanosleep(&ts, NULL);
+ tv.tv_sec = 0;
+ tv.tv_usec = 100000;
+ select(0, NULL, NULL, NULL, &tv);
/* Kill someone. */
kill(pids[random() % num_procs], SIGUSR1);