aboutsummaryrefslogtreecommitdiff
path: root/libexec/atrun/atrun.c
diff options
context:
space:
mode:
authorSimon J. Gerraty <sjg@FreeBSD.org>2014-04-28 07:50:45 +0000
committerSimon J. Gerraty <sjg@FreeBSD.org>2014-04-28 07:50:45 +0000
commit3b8f08459569bf0faa21473e5cec2491e95c9349 (patch)
tree80f45dd81ca716bcd7ca9674581e1fc40b93cd34 /libexec/atrun/atrun.c
parent9d2ab4a62d6733c45958627ac113bdbd818d1e2a (diff)
parentb2ba55951383498f252746f618d513139da06e8e (diff)
Merge head
Notes
Notes: svn path=/projects/bmake/; revision=265044
Diffstat (limited to 'libexec/atrun/atrun.c')
-rw-r--r--libexec/atrun/atrun.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/libexec/atrun/atrun.c b/libexec/atrun/atrun.c
index 594107e3d2c1..1e25766c41b1 100644
--- a/libexec/atrun/atrun.c
+++ b/libexec/atrun/atrun.c
@@ -567,6 +567,12 @@ main(int argc, char *argv[])
if (run_batch && (gloadavg() < load_avg))
run_file(batch_name, batch_uid, batch_gid);
+ if (flock(dirfd(spool), LOCK_UN) == -1)
+ perr("cannot unlock %s", ATJOB_DIR);
+
+ if (closedir(spool) == -1)
+ perr("cannot closedir %s", ATJOB_DIR);
+
closelog();
exit(EXIT_SUCCESS);
}