aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMattias Andrée <maandree@member.fsf.org>2015-12-29 05:25:14 +0100
committerMattias Andrée <maandree@member.fsf.org>2015-12-29 05:25:14 +0100
commit8a8059409e67173d6767bcc1b394f27545157649 (patch)
treecc2b665793727e8c2dc23cbf0dced26fe4d2168c /src
parentimplement job running in remove_job (diff)
downloadsat-8a8059409e67173d6767bcc1b394f27545157649.tar.gz
sat-8a8059409e67173d6767bcc1b394f27545157649.tar.bz2
sat-8a8059409e67173d6767bcc1b394f27545157649.tar.xz
m
Signed-off-by: Mattias Andrée <maandree@member.fsf.org>
Diffstat (limited to '')
-rw-r--r--src/daemon.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/daemon.c b/src/daemon.c
index edc230c..56fb682 100644
--- a/src/daemon.c
+++ b/src/daemon.c
@@ -363,7 +363,6 @@ found_it:
t (ftruncate(STATE_FILENO, (size_t)r + off));
free(buf), buf = NULL;
fsync(STATE_FILENO);
- flock(STATE_FILENO, LOCK_UN);
if (runjob) {
run_job_or_hook(job_full, runjob == 2 ? "expired" : "forced");
@@ -378,6 +377,7 @@ found_it:
free(job_full);
}
+ flock(STATE_FILENO, LOCK_UN); /* Unlock late so that hooks are synchronised. */
return rc;
fail: