diff options
| author | Guy Helmer <ghelmer@FreeBSD.org> | 2014-04-17 16:00:26 +0000 |
|---|---|---|
| committer | Guy Helmer <ghelmer@FreeBSD.org> | 2014-04-17 16:00:26 +0000 |
| commit | c759c060463d05c3a0f0dea19dcd532848517e59 (patch) | |
| tree | 9d7c660bafc2ad6d97fb0bd0541cf328b8db65bf /libexec | |
| parent | 48ecfdc4146bc2c864d25c31e8041df8db486e07 (diff) | |
Notes
Diffstat (limited to 'libexec')
| -rw-r--r-- | libexec/atrun/atrun.c | 6 |
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); } |
