definition:
|
processFork :: ReplState -> String -> IO (Maybe ReplState)
processFork rst args
| currMod rst == preludeName rst
= skipCommand "no program loaded"
| otherwise
= do exst <- compileMainExpression rst (if null args then "main" else args)
False
if exst == 0
then do
pid <- getPID
let execname = "." </> "MAINFORK" ++ show pid
renameFile ("." </> mainExpMod rst) execname
writeVerboseInfo rst 3 $
"Starting executable '" ++ execname ++ "'..."
system $ "( " ++ execname ++ " && rm -f " ++ execname ++ ") " ++
"> /dev/null 2> /dev/null &"
return $ Just rst
else return Nothing
|
demand:
|
argument 1
|
deterministic:
|
deterministic operation
|
documentation:
|
--- Process :fork command
|
failfree:
|
<FAILING>
|
indeterministic:
|
referentially transparent operation
|
infix:
|
no fixity defined
|
iotype:
|
{(_,_) |-> _}
|
name:
|
processFork
|
precedence:
|
no precedence defined
|
result-values:
|
_
|
signature:
|
REPL.State.ReplState -> String
-> Prelude.IO (Prelude.Maybe REPL.State.ReplState)
|
solution-complete:
|
operation might suspend on free variables
|
terminating:
|
possibly non-terminating
|
totally-defined:
|
possibly non-reducible on same data term
|