summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 6b55544)
raw | patch | inline | side by side (parent: 6b55544)
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 3a72ebac8e9ff50d4a4e7491fb3e3e1defa4a453..95a6831a70795a9b0dcda6b443f459e25887af38 100644 (file)
--- a/src/exec.c
+++ b/src/exec.c
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);