moved interruption to GFI level to capture all commands

This commit is contained in:
aarne
2008-06-26 21:01:51 +00:00
parent 9d909f32cf
commit 4a9bc587a5
8 changed files with 15 additions and 6 deletions

View File

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