windows: Fix start for already running daemon
This commit is contained in:
parent
ddaaf3e230
commit
9f883192af
1 changed files with 2 additions and 0 deletions
|
@ -81,6 +81,8 @@ lockPidFile pidfile = do
|
||||||
newfile = pidfile ++ ".new"
|
newfile = pidfile ++ ".new"
|
||||||
#else
|
#else
|
||||||
{- Not atomic on Windows, oh well. -}
|
{- Not atomic on Windows, oh well. -}
|
||||||
|
unlessM (isNothing <$> checkDaemon pidfile)
|
||||||
|
alreadyRunning
|
||||||
pid <- getPID
|
pid <- getPID
|
||||||
writeFile pidfile (show pid)
|
writeFile pidfile (show pid)
|
||||||
lckfile <- winLockFile pid pidfile
|
lckfile <- winLockFile pid pidfile
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue