This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java 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: PATCH: java/25330: A race condition in write_classfile


H. J. Lu writes:
 > With parallel build in libjava, several processes may want to generate
 > the same class file. They are using the same temporary class file. They
 > may override each other. This patch uses PID in temporary class file
 > to avoid it.
 > 
 > H.J.
 > ---
 > 2005-12-10  H.J. Lu  <hongjiu.lu@intel.com>
 > 
 > 	PR java/25330
 > 	* jcf-write.c (write_classfile): Use PID in temporary class
 > 	file. Save/restore errno when reporting error.

OK, thanks.

I did wonder if getpid() was perhaps not part of the OS support that
we assume to be present, but it's used without any guard in toplev.c,
so it must be fine to use it here too.

Andrew.


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