From owner-cvs-all Tue Mar 21 19: 2: 0 2000 Delivered-To: cvs-all@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (Postfix) with ESMTP id E480B37C0F5; Tue, 21 Mar 2000 19:01:54 -0800 (PST) (envelope-from brian@FreeBSD.org) Received: (from brian@localhost) by freefall.freebsd.org (8.9.3/8.9.2) id TAA86933; Tue, 21 Mar 2000 19:01:55 -0800 (PST) (envelope-from brian@FreeBSD.org) Message-Id: <200003220301.TAA86933@freefall.freebsd.org> From: Brian Somers Date: Tue, 21 Mar 2000 19:01:55 -0800 (PST) To: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/usr.sbin/ppp exec.c Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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