Date: Tue, 21 Mar 2000 19:01:55 -0800 (PST) From: Brian Somers <brian@FreeBSD.org> To: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/usr.sbin/ppp exec.c Message-ID: <200003220301.TAA86933@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
brian 2000/03/21 19:01:55 PST
Modified files:
usr.sbin/ppp exec.c
Log:
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() ?
Revision Changes Path
1.21 +38 -8 src/usr.sbin/ppp/exec.c
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200003220301.TAA86933>
