C Program to execute programs in same console
Erik Trulsson
ertr1013 at student.uu.se
Wed Apr 5 14:08:22 UTC 2006
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 at student.uu.se
More information about the freebsd-questions
mailing list