projects
/
ccan
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
98ba6e4
)
failtest: fix locking code.
author
Rusty Russell
<rusty@rustcorp.com.au>
Tue, 1 Mar 2011 00:52:56 +0000
(11:22 +1030)
committer
Rusty Russell
<rusty@rustcorp.com.au>
Tue, 1 Mar 2011 00:52:56 +0000
(11:22 +1030)
We need to get the locks back *after* the child runs.
ccan/failtest/failtest.c
patch
|
blob
|
history
diff --git
a/ccan/failtest/failtest.c
b/ccan/failtest/failtest.c
index 7d842d80fd035c9331ff7819c38906d30804aff3..e2e6c64fec64d188fed1b92184fbf64ad9951fd1 100644
(file)
--- a/
ccan/failtest/failtest.c
+++ b/
ccan/failtest/failtest.c
@@
-983,7
+983,6
@@
int failtest_fcntl(int fd, const char *file, unsigned line, int cmd, ...)
}
p = add_history(FAILTEST_FCNTL, file, line, &call);
- get_locks();
if (should_fail(p)) {
p->u.fcntl.ret = -1;
@@
-992,6
+991,7
@@
int failtest_fcntl(int fd, const char *file, unsigned line, int cmd, ...)
else
p->error = EDEADLK;
} else {
+ get_locks();
p->u.fcntl.ret = fcntl(p->u.fcntl.fd, p->u.fcntl.cmd,
&p->u.fcntl.arg.fl);
if (p->u.fcntl.ret == -1)