fix sigint handling

This commit is contained in:
nek0 2023-12-13 15:09:27 +01:00
parent 35da145cd1
commit 7c3fe35ca4
4 changed files with 4 additions and 5 deletions

View file

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

View file

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

View file

@ -76,7 +76,6 @@ main = do
) )
initRead initRead
initState initState
forever $ pure ()
where where
opts = info (options <**> helper) opts = info (options <**> helper)
( fullDesc ( fullDesc

View file

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