From owner-freebsd-questions@FreeBSD.ORG Wed Apr 5 14:08:22 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org 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 0E4F216A424 for ; Wed, 5 Apr 2006 14:08:22 +0000 (UTC) (envelope-from erikt@owl.midgard.homeip.net) Received: from pne-smtpout2-sn2.hy.skanova.net (pne-smtpout2-sn2.hy.skanova.net [81.228.8.164]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7FEA843D53 for ; Wed, 5 Apr 2006 14:08:21 +0000 (GMT) (envelope-from erikt@owl.midgard.homeip.net) Received: from falcon.midgard.homeip.net (83.253.29.241) by pne-smtpout2-sn2.hy.skanova.net (7.2.070) id 4430FC02000AF3C0 for freebsd-questions@freebsd.org; Wed, 5 Apr 2006 16:08:20 +0200 Received: (qmail 48472 invoked from network); 5 Apr 2006 16:08:19 +0200 Received: from owl.midgard.homeip.net (10.1.5.7) by falcon.midgard.homeip.net with SMTP; 5 Apr 2006 16:08:19 +0200 Received: (qmail 5742 invoked by uid 1001); 5 Apr 2006 16:08:19 +0200 Date: Wed, 5 Apr 2006 16:08:19 +0200 From: Erik Trulsson To: Jonathan Herriott Message-ID: <20060405140819.GA5733@owl.midgard.homeip.net> Mail-Followup-To: Jonathan Herriott , "usleepless@gmail.com" , freebsd-questions@freebsd.org References: <6a56d69c0604031439o7c2eed8an5710dad733a0e97@mail.gmail.com> <20060403174519.4d478a95.wmoran@collaborativefusion.com> <20060403220419.GA5042@epia2.farid-hajji.net> <6a56d69c0604041402i456d33cfm2c6f571e5c558e@mail.gmail.com> <6a56d69c0604041833y1f12fd43uc916f852128baeb5@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <6a56d69c0604041833y1f12fd43uc916f852128baeb5@mail.gmail.com> User-Agent: Mutt/1.5.11 Cc: freebsd-questions@freebsd.org, "usleepless@gmail.com" Subject: Re: C Program to execute programs in same console X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Apr 2006 14:08:22 -0000 On Tue, Apr 04, 2006 at 09:33:04PM -0400, Jonathan Herriott wrote: > usleep, > > What I am trying to do is execute the command in the calling shell. > So, if I were to execute my program, which changes the directory, it > would do the following: > > > pwd > /usr/home/username/ > > ./myprog .. > > pwd > /usr/home/ > > That's basically what I'm looking for. Being able to modify the > calling shell with a program. It is not possible to do that. A program can only change its own working directory, not that of other programs. -- Erik Trulsson ertr1013@student.uu.se