Skip to content
Snippets Groups Projects
Commit 9cd4288e authored by Dato Simó's avatar Dato Simó
Browse files

Hbal.hs: fix typo in signal handler names (hangle -> handle)


'hangleSigInt' and 'hangleSigTerm' are renamed to 'handleSigInt' and
'handleSigTerm', respectively.

Signed-off-by: default avatarDato Simó <dato@google.com>
Reviewed-by: default avatarMichele Tartara <mtartara@google.com>
parent 3bdbe4b3
No related branches found
No related tags found
No related merge requests found
......@@ -255,15 +255,15 @@ maybeExecJobs opts ord_plc fin_nl il cmd_jobs =
else return True
-- | Signal handler for graceful termination.
hangleSigInt :: IORef Int -> IO ()
hangleSigInt cref = do
handleSigInt :: IORef Int -> IO ()
handleSigInt cref = do
writeIORef cref 1
putStrLn ("Cancel request registered, will exit at" ++
" the end of the current job set...")
-- | Signal handler for immediate termination.
hangleSigTerm :: IORef Int -> IO ()
hangleSigTerm cref = do
handleSigTerm :: IORef Int -> IO ()
handleSigTerm cref = do
-- update the cref to 2, just for consistency
writeIORef cref 2
putStrLn "Double cancel request, exiting now..."
......@@ -274,7 +274,7 @@ runJobSet :: String -> Node.List -> Instance.List -> [JobSet] -> IO Bool
runJobSet master fin_nl il cmd_jobs = do
cref <- newIORef 0
mapM_ (\(hnd, sig) -> installHandler sig (Catch (hnd cref)) Nothing)
[(hangleSigTerm, softwareTermination), (hangleSigInt, keyboardSignal)]
[(handleSigTerm, softwareTermination), (handleSigInt, keyboardSignal)]
execWrapper master fin_nl il cref cmd_jobs
-- | Select the target node group.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment