diff options
| author | aarne <aarne@cs.chalmers.se> | 2008-06-26 21:01:51 +0000 |
|---|---|---|
| committer | aarne <aarne@cs.chalmers.se> | 2008-06-26 21:01:51 +0000 |
| commit | 33eb6d899fef48f2d38a92bc0fab66ff585be553 (patch) | |
| tree | 2e802e73a69f749fc03e45bb1411fdf03eb2ba27 /src/GFI.hs | |
| parent | ba639910078845c37641ccb2315095b4438cf0c8 (diff) | |
moved interruption to GFI level to capture all commands
Diffstat (limited to 'src/GFI.hs')
| -rw-r--r-- | src/GFI.hs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/GFI.hs b/src/GFI.hs index 75ffa22d8..014fa327e 100644 --- a/src/GFI.hs +++ b/src/GFI.hs @@ -26,6 +26,8 @@ import System.Cmd import System.CPUTime import Control.Exception import Data.Version +import GF.System.Signal + import Paths_gf @@ -53,7 +55,7 @@ loop opts gfenv0 = do pwords = case words s of w:ws -> getCommandOp w :ws ws -> ws - case pwords of + r <- runInterruptibly $ case pwords of -- special commands, requiring source grammar in env "!":ws -> do system $ unwords ws @@ -106,6 +108,8 @@ loop opts gfenv0 = do _ -> do interpretCommandLine enc env s loopNewCPU gfenv + gfenv' <- return $ either (const gfenv) id r + loopNewCPU gfenv' importInEnv :: GFEnv -> Options -> [FilePath] -> IO GFEnv importInEnv gfenv opts files |
