/*
* (c) The University of Glasgow 1994-2004
*
+ * WARNING: this file is here for backwards compatibility only. It is
+ * not included as part of the base package, but is #included into the
+ * compiler and the runghc utility when building either of these with
+ * an old version of GHC.
+ *
* shell-less system Runtime Support (see System.Cmd.rawSystem).
*/
Since we are going to wait for the process to terminate anyway,
there is no problem with such sharing. */
+ errno = EINVAL; // ToDo: wrong, caller should use GetLastError()
return -1;
}
WaitForSingleObject(pInfo.hProcess, INFINITE);
- if (GetExitCodeProcess(pInfo.hProcess, &retCode) == 0) return -1;
+ if (GetExitCodeProcess(pInfo.hProcess, &retCode) == 0) {
+ errno = EINVAL; // ToDo: wrong, caller should use GetLastError()
+ return -1;
+ }
CloseHandle(pInfo.hProcess);
CloseHandle(pInfo.hThread);