Lines Matching refs:statusPipe
61 static void die (int statusPipe, const char* message) in die() argument
67 res = (int)write(statusPipe, message, msgLen+1); in die()
72 static void dieLastError (int statusPipe, const char* message) in dieLastError() argument
77 die(statusPipe, msgBuf); in dieLastError()
109 static void execProcess (const char* commandLine, const char* workingDirectory, int statusPipe) in execProcess() argument
115 die(statusPipe, "Command line parsing failed (out of memory)"); in execProcess()
118 dieLastError(statusPipe, "chdir() failed"); in execProcess()
133 dieLastError(statusPipe, "execv() failed"); in execProcess()
222 int statusPipe[2] = { -1, -1 }; in deProcess_start() local
235 if (pipe(pipeIn) < 0 || pipe(pipeOut) < 0 || pipe(pipeErr) < 0 || pipe(statusPipe) < 0) in deProcess_start()
242 closePipe(statusPipe); in deProcess_start()
256 closePipe(statusPipe); in deProcess_start()
269 close(statusPipe[0]); in deProcess_start()
272 if (fcntl(statusPipe[1], F_SETFD, FD_CLOEXEC) != 0) in deProcess_start()
273 dieLastError(statusPipe[1], "Failed to set FD_CLOEXEC"); in deProcess_start()
278 dieLastError(statusPipe[1], "dup2() failed"); in deProcess_start()
284 dieLastError(statusPipe[1], "dup2() failed"); in deProcess_start()
290 dieLastError(statusPipe[1], "dup2() failed"); in deProcess_start()
294 execProcess(commandLine, workingDirectory, statusPipe[1]); in deProcess_start()
305 close(statusPipe[1]); in deProcess_start()
306 while ((result = read(statusPipe[0], errBuf, 1)) == -1) in deProcess_start()
317 result = read(statusPipe[0], errBuf+errPos, 1); in deProcess_start()
328 close(statusPipe[0]); in deProcess_start()
342 close(statusPipe[0]); in deProcess_start()