git.samba.org
/
sahlberg
/
ctdb.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e90aba9
)
tdb: Fix bug 7248, avoid the nanosleep dependency
author
Volker Lendecke
<vl@samba.org>
Thu, 22 Apr 2010 04:24:06 +0000
(13:54 +0930)
committer
Rusty Russell
<rusty@rustcorp.com.au>
Thu, 22 Apr 2010 04:24:06 +0000
(13:54 +0930)
(Imported from commit
e2c7e5c4f72565fe49265d5b036531926ea1ac92
)
lib/tdb/tools/tdbtorture.c
patch
|
blob
|
history
diff --git
a/lib/tdb/tools/tdbtorture.c
b/lib/tdb/tools/tdbtorture.c
index 5ee6991825b859975a3aa8fab0eee18f547bf726..eda79f83d8ee726f6f6f1405a8830d68ad5c84c1 100644
(file)
--- 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 time
spec ts
;
+ struct time
val tv
;
/* Sleep for 1/10 second. */
- t
s
.tv_sec = 0;
- t
s.tv_nsec = 1000
00000;
-
nanosleep(&ts, NULL
);
+ t
v
.tv_sec = 0;
+ t
v.tv_usec = 1
00000;
+
select(0, NULL, NULL, NULL, &tv
);
/* Kill someone. */
kill(pids[random() % num_procs], SIGUSR1);