Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 5 Apr 2006 16:08:19 +0200
From:      Erik Trulsson <ertr1013@student.uu.se>
To:        Jonathan Herriott <herriojr@gmail.com>
Cc:        freebsd-questions@freebsd.org, "usleepless@gmail.com" <usleepless@gmail.com>
Subject:   Re: C Program to execute programs in same console
Message-ID:  <20060405140819.GA5733@owl.midgard.homeip.net>
In-Reply-To: <6a56d69c0604041833y1f12fd43uc916f852128baeb5@mail.gmail.com>
References:  <6a56d69c0604031439o7c2eed8an5710dad733a0e97@mail.gmail.com> <20060403174519.4d478a95.wmoran@collaborativefusion.com> <20060403220419.GA5042@epia2.farid-hajji.net> <6a56d69c0604041402i456d33cfm2c6f571e5c558e@mail.gmail.com> <c39ec84c0604041430m75e7f510h49f9cbecca89a35b@mail.gmail.com> <6a56d69c0604041833y1f12fd43uc916f852128baeb5@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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.



-- 
<Insert your favourite quote here.>
Erik Trulsson
ertr1013@student.uu.se



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060405140819.GA5733>