From owner-freebsd-arch Mon Oct 29 13:44:15 2001 Delivered-To: freebsd-arch@freebsd.org Received: from mail5.speakeasy.net (mail5.speakeasy.net [216.254.0.205]) by hub.freebsd.org (Postfix) with ESMTP id 5C34437B405 for ; Mon, 29 Oct 2001 13:44:05 -0800 (PST) Received: (qmail 96698 invoked from network); 29 Oct 2001 21:44:04 -0000 Received: from unknown (HELO laptop.baldwin.cx) ([64.81.54.73]) (envelope-sender ) by mail5.speakeasy.net (qmail-ldap-1.03) with SMTP for ; 29 Oct 2001 21:44:04 -0000 Message-ID: X-Mailer: XFMail 1.4.0 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: Date: Mon, 29 Oct 2001 13:43:53 -0800 (PST) From: John Baldwin To: Julian Elischer Subject: Re: syscall() ABI questions Cc: arch@FreeBSD.ORG, Jake Burkholder Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On 29-Oct-01 Julian Elischer wrote: > But the API for vfork forbids the child from doing a 'ret' after the vfork > returns.. if it does that, all bets are off.... you can do: > vfork(); > exec(); > > and that 's about all that's ok... > I'm not even sure about > vfork(); > exit(); Jake is talking about the return from the actual vfork() wrapper in libc for the syscall. We have to return from that. :) So we do that by saving the return address in a register and adjusting the stack before return in case the child clobbers that part of the stack we can restore it for the parent. -- John Baldwin -- http://www.FreeBSD.org/~jhb/ PGP Key: http://www.baldwin.cx/~john/pgpkey.asc "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message