This is the mail archive of the gcc-prs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: libgcj/7568: Runtime.exec ignores directory argument


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);
 > + 	      }
 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]