Changeset 14346 for src/Pugs/Prim.hs

Show
Ignore:
Timestamp:
10/17/06 08:25:56 (2 years ago)
Author:
audreyt
svk:copy_cache_prev:
21206
Message:

* Make system() nonfatal always; instead it merely sets $!.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • src/Pugs/Prim.hs

    r14341 r14346  
    506506op1 "system" = \v -> do 
    507507    cmd         <- fromVal v 
    508     exitCode    <- guardIO $ system (encodeUTF8 cmd) 
     508    exitCode    <- tryIO (ExitFailure (-1)) $ system (encodeUTF8 cmd) 
    509509    handleExitCode exitCode 
    510510op1 "accept" = \v -> do 
     
    10821082    prog        <- fromVal x 
    10831083    args        <- fromVals y 
    1084     exitCode    <- guardIO $ rawSystem (encodeUTF8 prog) (map encodeUTF8 args) 
     1084    exitCode    <- tryIO (ExitFailure (-1)) $ 
     1085        rawSystem (encodeUTF8 prog) (map encodeUTF8 args) 
    10851086    handleExitCode exitCode 
    10861087op2 "crypt" = \x y -> opPerl5 "crypt" [x, y]