From 9cd4288ed7f3af450eaacf38ccb0767b7fe86553 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dato=20Sim=C3=B3?= <dato@google.com> Date: Wed, 7 Nov 2012 17:38:01 +0000 Subject: [PATCH] Hbal.hs: fix typo in signal handler names (hangle -> handle) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 'hangleSigInt' and 'hangleSigTerm' are renamed to 'handleSigInt' and 'handleSigTerm', respectively. Signed-off-by: Dato SimΓ³ <dato@google.com> Reviewed-by: Michele Tartara <mtartara@google.com> --- htools/Ganeti/HTools/Program/Hbal.hs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/htools/Ganeti/HTools/Program/Hbal.hs b/htools/Ganeti/HTools/Program/Hbal.hs index ca0b03707..e54b4d1cc 100644 --- a/htools/Ganeti/HTools/Program/Hbal.hs +++ b/htools/Ganeti/HTools/Program/Hbal.hs @@ -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. -- GitLab