This is the mail archive of the
guile@sourceware.cygnus.com
mailing list for the Guile project.
Re: changing directory
Ivan Toshkov <ivant@ifao.net> writes:
> On Fri, Jun 09, 2000 at 05:19:53PM +0200, Mikael Djurfeldt wrote:
> > Olivier Buechel <Olivier.Buechel@unifr.ch> writes:
> >
> > > This may be more scheme than guile;
> > > When i do a systemcall (system "wget www.xy.zz") the file wget will
> > > download will be saved in the current shell directory
> > > i.e. (system "pwd"). How can i change my current directory?
> >
> > (chdir "xxx")
> >
> > > I tried
> > > (system "cd /home/buechel/download") but this has not changed. What
> > > does it do then?
> >
> > It changes the directory in the subshell which Guile has started.
>
> I thought that (system ...) forks and execs another shell each time it
> is evaluated, which too explains this "wrong" behavior.
Well, that is consistent with what I said, since "another shell" would
be a subshell, right?
However, the Scheme level `system' actually calls OS system. That is,
it is synchronous, and does not fork.