This is the mail archive of the
gdb-patches@sourceware.cygnus.com
mailing list for the GDB project.
Re: Shell escape in the DJGPP port of GDB
- To: fnasser@cygnus.com
- Subject: Re: Shell escape in the DJGPP port of GDB
- From: DJ Delorie <dj@delorie.com>
- Date: Fri, 20 Aug 1999 15:17:18 -0400
- CC: Eliz@is.elta.co.il, gdb-patches@sourceware.cygnus.com, shebs@cygnus.com
- References: <37BDA912.4AA1190D@cygnus.com>
DOS-based programs don't get a separate working directory per process;
the current working directory is a global resource. Thus, if the
child process changes the directory for itself, it changes the
directory for gdb also. Thus, the chdir() back to the original
directory is a safety for all dos-like environments.
In unix it should be completely unneeded, because unix itself isolates
such changes within the child process.