aboutsummaryrefslogtreecommitdiff
path: root/Utility
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2014-02-13 17:37:49 -0400
committerGravatar Joey Hess <joey@kitenet.net>2014-02-13 17:38:56 -0400
commit63bb3945e6d011f363d104b60d3cde230afcbe4e (patch)
tree6d5e27261fdf0001c1d078f8d8f7abc1eebb4573 /Utility
parenta994ed3b59ca0611f42ebc3ce875ee6f3a6d8de1 (diff)
windows: Fix start for already running daemon
Diffstat (limited to 'Utility')
-rw-r--r--Utility/Daemon.hs2
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