summaryrefslogtreecommitdiffhomepage
path: root/Commands.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Commands.hs')
-rw-r--r--Commands.hs4
1 files changed, 3 insertions, 1 deletions
diff --git a/Commands.hs b/Commands.hs
index 93f7572..bdc8d60 100644
--- a/Commands.hs
+++ b/Commands.hs
@@ -23,7 +23,9 @@ module Commands
, tenthSeconds
) where
+import Prelude hiding (catch)
import Control.Concurrent
+import Control.Exception
import Data.Char
import System.Process
import System.Exit
@@ -65,7 +67,7 @@ instance Exec Command where
hClose e
case exit of
ExitSuccess -> do
- str <- hGetLineSafe o
+ str <- catch (hGetLineSafe o) (\eof -> return "")
closeHandles
cb str
_ -> do closeHandles