--- parser3/src/main/pa_exec.C 2004/02/11 15:33:15 1.57 +++ parser3/src/main/pa_exec.C 2004/05/25 06:20:48 1.59 @@ -7,7 +7,7 @@ @todo setrlimit */ -static const char * const IDENT_EXEC_C="$Date: 2004/02/11 15:33:15 $"; +static const char * const IDENT_EXEC_C="$Date: 2004/05/25 06:20:48 $"; #include "pa_config_includes.h" @@ -271,7 +271,9 @@ static pid_t execve_piped(const char* fi static int get_exit_status(int pid) { int status; - if(!waitpid(pid, &status, 0)) + pid_t cid; + while ((cid=waitpid(pid, &status, WUNTRACED)) == -1 && errno == EINTR); + if(!cid) return -1; return WIFEXITED(status) ? WEXITSTATUS(status) : -2; @@ -443,10 +445,12 @@ from http://www.apache.org/websrc/cvsweb close(pipe_err); result.status=get_exit_status(pid); // negative may mean "-errno[execl()]" - } else + } else { + const char* str=strerror(errno); throw Exception(0, &file_spec, - "%s error: %s (%d)", pid<0?"fork":"pipe", strerror(errno), errno); + "%s error: %s (%d)", pid<0?"fork":"pipe", str?str:"", errno); + } #endif return result;