fix sigint handling
This commit is contained in:
parent
35da145cd1
commit
7c3fe35ca4
4 changed files with 4 additions and 5 deletions
|
@ -1,5 +1,5 @@
|
||||||
setSocketPath : "/tmp/wizard.sock"
|
setSocketPath : "/tmp/wizard.sock"
|
||||||
setMapRows : 20
|
setMapRows : 50
|
||||||
setMapColumns : 20
|
setMapColumns : 50
|
||||||
setSpawnerProbability : 0.01
|
setSpawnerProbability : 0.01
|
||||||
setFPS : 5
|
setFPS : 5
|
||||||
|
|
|
@ -81,6 +81,6 @@ terminateGameOnSigint = do
|
||||||
sendMessage (ClientMessage clientId ClientQuit) sock
|
sendMessage (ClientMessage clientId ClientQuit) sock
|
||||||
close sock
|
close sock
|
||||||
-- Raise SIGINT again so it does not get blocked
|
-- Raise SIGINT again so it does not get blocked
|
||||||
raiseSignal keyboardSignal
|
-- raiseSignal keyboardSignal
|
||||||
)
|
)
|
||||||
Nothing
|
Nothing
|
||||||
|
|
|
@ -76,7 +76,6 @@ main = do
|
||||||
)
|
)
|
||||||
initRead
|
initRead
|
||||||
initState
|
initState
|
||||||
forever $ pure ()
|
|
||||||
where
|
where
|
||||||
opts = info (options <**> helper)
|
opts = info (options <**> helper)
|
||||||
( fullDesc
|
( fullDesc
|
||||||
|
|
|
@ -74,7 +74,7 @@ terminateGameOnSigint path = do
|
||||||
close sock
|
close sock
|
||||||
removeIfExists path
|
removeIfExists path
|
||||||
-- Raise SIGINT again so it does not get blocked
|
-- Raise SIGINT again so it does not get blocked
|
||||||
raiseSignal sigINT
|
-- raiseSignal sigINT
|
||||||
)
|
)
|
||||||
Nothing
|
Nothing
|
||||||
where
|
where
|
||||||
|
|
Loading…
Reference in a new issue