char *szCurrentDir;
pipex->state=0;
pipex->name=szName;
+ pipex->command=szProcFile;
+ pipex->quit_pending=FALSE;
pipex->hProcess=NULL;
if (szProcFile == NULL) {
pipex->hInput = GetStdHandle(STD_INPUT_HANDLE);
my_fatal("pipex_open(): cannot change directory: %s\n",
strerror(errno));
}
- if(CreateProcess(NULL,
+ if(CreateProcess(NULL,
(LPSTR) szProcFile,
NULL,
NULL,
DWORD lpexit;
CloseHandle(pipex->hInput);
CloseHandle(pipex->hOutput);
-
+ if(!pipex->quit_pending){
+ // suppress further errors
+ pipex->quit_pending=TRUE;
+ my_fatal("pipex_exit(): %s: child exited unexpectedly.\n",pipex->command);
+ }
if(GetExitCodeProcess(pipex->hProcess,&lpexit)){
if(lpexit==STILL_ACTIVE)
//must be java,hammer it down!