version 1.1.2.4, 2013/12/05 14:12:25
|
version 1.1.2.5, 2013/12/05 14:16:33
|
Line 140 io_progOpen(prog_t * __restrict prg, u_int execNum)
|
Line 140 io_progOpen(prog_t * __restrict prg, u_int execNum)
|
f = io_popen(prg->prog_name, "r+", &pid); |
f = io_popen(prg->prog_name, "r+", &pid); |
if (!f) { |
if (!f) { |
LOGERR; |
LOGERR; |
ret *= -1; | ret = -1; |
break; |
break; |
} else if (waitpid(pid, &stat, WNOHANG) > 0) { |
} else if (waitpid(pid, &stat, WNOHANG) > 0) { |
io_SetErr(ECHILD, "Program exit with status %d", |
io_SetErr(ECHILD, "Program exit with status %d", |
WIFEXITED(stat) ? WEXITSTATUS(stat) : -1); |
WIFEXITED(stat) ? WEXITSTATUS(stat) : -1); |
ret *= -1; | ret = -1; |
break; |
break; |
} else |
} else |
array_Set(prg->prog_fds, i, f); |
array_Set(prg->prog_fds, i, f); |