
14 Apr
2009
14 Apr
'09
8:27 p.m.
On Tuesday, 14.04.09 at 22:13, Lennart Augustsson wrote:
So the right way to do this (like opening a file), is to try executing it and let the OS tell you if it failed.
I know, but the various functions that create processes don't help me know whether the program actually ran or not. For example,
createProcess (proc "nosuch" []) >>= \(_,_,_,ph) -> waitForProcess ph
returns ExitCode 127. If I use the same code to run 'test', a C program that returns 127, I get the same thing.