diff options
| author | Joey Hess <joeyh@joeyh.name> | 2017-09-01 18:31:21 -0400 |
|---|---|---|
| committer | Joey Hess <joeyh@joeyh.name> | 2017-09-01 18:31:21 -0400 |
| commit | d7bd21baf58538b76cb47ac974894cab2b411589 (patch) | |
| tree | e4fb58f6a63f30af6db3a2c827fbcf0862099ef4 /src/Propellor/Engine.hs | |
| parent | 2218c28618fc918998fdb5aeb7f89f3105e918bb (diff) | |
Make lock file descriptors close-on-exec.
Diffstat (limited to 'src/Propellor/Engine.hs')
| -rw-r--r-- | src/Propellor/Engine.hs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/Propellor/Engine.hs b/src/Propellor/Engine.hs index f54da929..b4dc66ce 100644 --- a/src/Propellor/Engine.hs +++ b/src/Propellor/Engine.hs @@ -97,6 +97,7 @@ onlyProcess lockfile a = bracket lock unlock (const a) lock = do createDirectoryIfMissing True (takeDirectory lockfile) l <- createFile lockfile stdFileMode + setFdOption l CloseOnExec True setLock l (WriteLock, AbsoluteSeek, 0, 0) `catchIO` const alreadyrunning return l |
