git.samba.org
/
kai
/
samba-autobuild
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
12f97c0
)
tdb: Fix bug 7248, avoid the nanosleep dependency
author
Volker Lendecke
<vl@samba.org>
Sun, 14 Mar 2010 19:07:58 +0000
(20:07 +0100)
committer
Volker Lendecke
<vl@samba.org>
Mon, 22 Mar 2010 20:29:21 +0000
(21:29 +0100)
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);