This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: Initialize the correct cwd for the child
- To: Eli Zaretskii <eliz at is dot elta dot co dot il>, Michael Snyder <msnyder at redhat dot com>
- Subject: Re: Initialize the correct cwd for the child
- From: Robert Hoehne <robert dot hoehne at gmx dot net>
- Date: Sat, 5 Aug 2000 23:55:15 +0200
- CC: gdb-patches at sourceware dot cygnus dot com
- Organization: none provided
> Eli Zaretskii wrote:
> >
> > Thanks for the patch. However, I wonder: what would be the cwd of an
> > inferior on Unix, after the following commands:
> >
> > gdb foo
> > cd bar
> > run
> >
> > I think the DJGPP port should, as much as possible, behave the same
> > way as GDB does on Unix.
>
> I'm pretty sure the cwd would be bar, so the patch
> would make djgpp behave more like unix does.
>
At first I tried it under Linux, and there the child got the directory after the
cd command.
The problem here is only the DJGPP situation, where we
need to save (and restore) the childs cwd, since on unix the child runs
as a separate thred (or process), where the OS does the job for remembering
the cwd.
******************************************************
* email: Robert Hoehne <robert.hoehne@gmx.net> *
* Post: Am Berg 3, D-09573 Dittmannsdorf, Germany *
* WWW: http://www.tu-chemnitz.de/~sho/rho *
******************************************************