diff options
author | Joey Hess <joey@kitenet.net> | 2014-02-13 17:37:49 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2014-02-13 17:38:56 -0400 |
commit | 63bb3945e6d011f363d104b60d3cde230afcbe4e (patch) | |
tree | 6d5e27261fdf0001c1d078f8d8f7abc1eebb4573 | |
parent | a994ed3b59ca0611f42ebc3ce875ee6f3a6d8de1 (diff) |
windows: Fix start for already running daemon
-rw-r--r-- | Utility/Daemon.hs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Utility/Daemon.hs b/Utility/Daemon.hs index b604b1794..11aa57686 100644 --- a/Utility/Daemon.hs +++ b/Utility/Daemon.hs @@ -81,6 +81,8 @@ lockPidFile pidfile = do newfile = pidfile ++ ".new" #else {- Not atomic on Windows, oh well. -} + unlessM (isNothing <$> checkDaemon pidfile) + alreadyRunning pid <- getPID writeFile pidfile (show pid) lckfile <- winLockFile pid pidfile |