projects
/
collectd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6b55544
)
Exec plugin: Reset the "PL_RUNNING" if "fork_child()" fails.
author
Florian Forster
<octo@leeloo.lan.home.verplant.org>
Tue, 9 Mar 2010 17:50:32 +0000
(18:50 +0100)
committer
Florian Forster
<octo@leeloo.lan.home.verplant.org>
Tue, 9 Mar 2010 17:50:32 +0000
(18:50 +0100)
src/exec.c
patch
|
blob
|
history
diff --git
a/src/exec.c
b/src/exec.c
index
3a72eba
..
95a6831
100644
(file)
--- a/
src/exec.c
+++ b/
src/exec.c
@@
-537,7
+537,13
@@
static void *exec_read_one (void *arg) /* {{{ */
status = fork_child (pl, NULL, &fd, &fd_err);
if (status < 0)
+ {
+ /* Reset the "running" flag */
+ pthread_mutex_lock (&pl_lock);
+ pl->flags &= ~PL_RUNNING;
+ pthread_mutex_unlock (&pl_lock);
pthread_exit ((void *) 1);
+ }
pl->pid = status;
assert (pl->pid != 0);