windows: Fix start for already running daemon

This commit is contained in:
Joey Hess 2014-02-13 17:37:49 -04:00
parent ddaaf3e230
commit 9f883192af

View file

@ -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