git.samba.org
/
metze
/
ctdb
/
wip.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1269458
)
eventscript: handle v. unlikely timeout race
author
Rusty Russell
<rusty@rustcorp.com.au>
Mon, 7 Dec 2009 12:47:23 +0000
(23:17 +1030)
committer
Rusty Russell
<rusty@rustcorp.com.au>
Mon, 7 Dec 2009 12:47:23 +0000
(23:17 +1030)
If we time out just as the child exits, we currently will report an
uninitialized cb_status field. Set it to -ETIME as expected.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
server/eventscript.c
patch
|
blob
|
history
diff --git
a/server/eventscript.c
b/server/eventscript.c
index 940b49ec7b44662a76daf67a94e0f79a45e24cf5..f24f13bedc866ab8a16591ebfb9d5aee3f7d0914 100644
(file)
--- a/
server/eventscript.c
+++ b/
server/eventscript.c
@@
-651,6
+651,7
@@
static void ctdb_event_script_timeout(struct event_context *ev, struct timed_eve
if (kill(state->child, 0) != 0) {
DEBUG(DEBUG_ERR,("Event script child process already dead, errno %s(%d)\n", strerror(errno), errno));
state->child = 0;
+ state->cb_status = -ETIME;
talloc_free(state);
return;
}