You need to sign in or sign up before continuing.
waitForProcess fails with "Bad file descriptor"
I am running this small sample program:
int main() { return -1; }
from this Haskell code (both from ghci and compiled):
import System.Process
main = system "a.exe" >> putStrLn "This is not printed"
and get this error
tmp.exe: waitForProcess: invalid argument (Bad file descriptor)
I guess there is a runtime error inside system-call which crashes execution.
I am on Windows 7, ghc 6.12.1. I tried both Cygwin g++ and MSVS cl C++ compilers.
One side question: is there any other way to run external program?
Trac metadata
| Trac field | Value |
|---|---|
| Version | 6.12.3 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | libraries/process |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture | x86_64 (amd64) |