From owner-freebsd-questions Fri Dec 20 2:24:14 2002 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 32E2937B401 for ; Fri, 20 Dec 2002 02:24:13 -0800 (PST) Received: from grillolja.cs.umu.se (grillolja.cs.umu.se [130.239.40.17]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6925F43ED8 for ; Fri, 20 Dec 2002 02:24:12 -0800 (PST) (envelope-from tdv94ped@cs.umu.se) Received: from localhost (localhost [127.0.0.1]) by amavisd-new (Postfix) with ESMTP id 652249FD0; Fri, 20 Dec 2002 11:24:11 +0100 (MET) Received: from kvist.cs.umu.se (kvist.cs.umu.se [130.239.40.192]) (using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits)) (No client certificate requested) by grillolja.cs.umu.se (Postfix) with ESMTP id 527439FA5; Fri, 20 Dec 2002 11:24:09 +0100 (MET) Date: Fri, 20 Dec 2002 11:24:08 +0100 (MET) From: Paul Everlund To: Aaron Burke Cc: freebsd-questions@freebsd.org Subject: RE: Problems with a C application that changes users and run 'screen -x' In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by amavisd-new amavisd-new-20020630 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Fri, 20 Dec 2002, Paul Everlund wrote: Found an error in my reply... > On Fri, 20 Dec 2002, Aaron Burke wrote: > [big snip] > I think execlp is writing over your current process. So first your > process is exchanged with ppp, then ppp is exchanged with screen. You > have to make a copy of your current process, a.out, by using fork, and > then exchange the process image in this copy using execlp. Correction... Your a.out process is replaced with ppp, then nothing else happens, as screen never is called du to the replacement. > Best regards, > Paul Best regards, Paul To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message