From owner-freebsd-hackers Tue Feb 5 10:49: 0 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mel-rto6.wanadoo.fr (smtp-out-6.wanadoo.fr [193.252.19.25]) by hub.freebsd.org (Postfix) with ESMTP id 9C33437B41F for ; Tue, 5 Feb 2002 10:48:53 -0800 (PST) Received: from mel-rta10.wanadoo.fr (193.252.19.193) by mel-rto6.wanadoo.fr; 5 Feb 2002 19:48:52 +0100 Received: from mail-web7 (193.252.19.214) by mel-rta10.wanadoo.fr; 5 Feb 2002 19:48:34 +0100 Received: from '' by www.wanadoo.fr with HTTP; Tue, 05 Feb 2002 19:48:34 +0100 (MET) Message-ID: <3c6029023c8c1abe@mel-rta10.wanadoo.fr> (added by mel-rta10.wanadoo.fr) Date: Tue, 05 Feb 2002 19:48:34 +0100 (MET) From: "Jonathan BENSAMOUN" To: Subject: switching context and execute MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Here is my problem ... I have got a process which syscall myown function. This function forks the process in a child which has to execve. My method : - I hook in fork to insert the execve - before calling the execve I have to switch context. I use mi_switch and cpu_switch. But ! My parent process has to control the error returned by the child SO= ! I have to write in the child instructions stack : 1/ A call to execve 2/ The come back in the parent process context If anyone has an example for a such manipulation ... Thanks John To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message