This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: PATCH: java/25330: A race condition in write_classfile
- From: Andrew Haley <aph at redhat dot com>
- To: "H. J. Lu" <hjl at lucon dot org>
- Cc: gcc-patches at gcc dot gnu dot org, java-patches at gcc dot gnu dot org
- Date: Mon, 12 Dec 2005 11:21:39 +0000
- Subject: Re: PATCH: java/25330: A race condition in write_classfile
- References: <20051210220307.GA3876@lucon.org>
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.