summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
1d210d0)
Re-commit of cygwin32 fix
systemCmd(cmd)
StgByteArray cmd;
{
systemCmd(cmd)
StgByteArray cmd;
{
+#if defined(cygwin32_TARGET_OS)
+ /* The implementation of std. fork() has its problems
+ under cygwin32-b18, so we fall back on using libc's
+ system() instead. (It in turn has problems, as it
+ does not wait until the sub shell has finished before
+ returning. Using sleep() works around that.)
+ */
+ if (system(cmd) < 0) {
+ cvtErrno();
+ stdErrno();
+ return -1;
+ }
+ sleep(1);
+ return 0;
+#else
ghc_errstr = "internal error (process neither exited nor signalled)";
}
return -1;
ghc_errstr = "internal error (process neither exited nor signalled)";
}
return -1;