Searched hist:58454 (Results 1 - 1 of 1) sorted by relevance
/freebsd-10.0-release/usr.sbin/ppp/ | ||
H A D | exec.c | diff 58454 Wed Mar 22 01:01:53 MST 2000 brian Do some vfork() trickery so that the parent can determine if the childs exec() has succeeded or failed by taking advantage of the fact that both processes share the same memory. FWIW: I tried to implement this by doing a pipe(), setting the write desciptors close-on-exec flag in the child and writing errno to the descriptor if the exec() fails. The parent can then ``if (read()) got errno else exec worked''. This didn't work though - the child could write() to fd[1] on exec failure, but the parent got 0 trying to read() from fd[0] ! Is this a bug in execve() ? |
Completed in 149 milliseconds