@@ -1264,8 +1264,17 @@ process fn (Execute tm)
12641264 ir <- compile t tmpn (Just m)
12651265 runIO $ generate t (fst (head (idris_imported ist))) ir
12661266 case idris_outputmode ist of
1267− RawOutput h -> do runIO $ rawSystem progName []
1268− return ()
1267+ RawOutput h ->
1268+ do res <- runIO $ rawSystem progName []
1269+ case res of
1270+ ExitSuccess -> return ()
1271+ ExitFailure err ->
1272+ ifail $ "Compiled program " ++
1273+ if err < 0
1274+ then "was killed by signal " ++
1275+ show (0 - err)
1276+ else "terminated with exit code " ++
1277+ show err
12691278 IdeMode n h -> runIO . hPutStrLn h $
12701279 IdeMode.convSExp "run-program" tmpn n)
12711280 (\e -> getIState >>= iRenderError . flip pprintErr e)