This is the mail archive of the
gcc-prs@gcc.gnu.org
mailing list for the GCC project.
Re: libgcj/7568: Runtime.exec ignores directory argument
- From: Andrew Pinski <pinskia at physics dot uc dot edu>
- To: nobody at gcc dot gnu dot org
- Cc: gcc-prs at gcc dot gnu dot org,
- Date: 10 Aug 2002 20:46:01 -0000
- Subject: Re: libgcj/7568: Runtime.exec ignores directory argument
- Reply-to: Andrew Pinski <pinskia at physics dot uc dot edu>
The following reply was made to PR libgcj/7568; it has been noted by GNATS.
From: Andrew Pinski <pinskia@physics.uc.edu>
To: jmr@ugcs.caltech.edu
Cc: gcc-gnats@gcc.gnu.org
Subject: Re: libgcj/7568: Runtime.exec ignores directory argument
Date: Sat, 10 Aug 2002 16:39:37 -0400
Yes you did forget something, this is wrong when the process
already is multithreaded,
it creates memory which I think violates POSIX for what is able
to do after forking.
Get the string before forking would be better anyway.
Thanks,
Andrew Pinski
On Saturday, August 10, 2002, at 04:21 , jmr@ugcs.caltech.edu wrote:
>
> +
> + // Change directory
> + if (dir != NULL)
> + if (chdir (new_string (dir->getPath ())) != 0)
> + {
> + char c = errno;
> + write (msgp[1], &c, 1);
> + _exit (127);
> + }