]> Savannah Git Hosting - gnulib.git/commitdiff
javacomp: Make more robust in multithreaded applications.
authorBruno Haible <bruno@clisp.org>
Tue, 26 May 2020 16:05:34 +0000 (18:05 +0200)
committerBruno Haible <bruno@clisp.org>
Wed, 27 May 2020 17:30:50 +0000 (19:30 +0200)
* lib/javacomp.c (write_temp_file): Pass an 'e' flag to fopen_temp.
* modules/javacomp (Depends-on): Add fopen-gnu.

ChangeLog
lib/javacomp.c
modules/javacomp

index be5b2a19a0d5a1349316ec28b6954c5b4658de1e..aa0843944d4ae05351f41f3902253fe02d95f6af 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2020-05-27  Bruno Haible  <bruno@clisp.org>
+
+       javacomp: Make more robust in multithreaded applications.
+       * lib/javacomp.c (write_temp_file): Pass an 'e' flag to fopen_temp.
+       * modules/javacomp (Depends-on): Add fopen-gnu.
+
 2020-05-27  Bruno Haible  <bruno@clisp.org>
 
        mountlist: Make more robust in multithreaded applications.
index 923961699bd443e299ac530608f6ca60b9c7779c..ac5619637cca1130e178fb71294dc2bb250d20d0 100644 (file)
@@ -573,7 +573,7 @@ write_temp_file (struct temp_dir *tmpdir, const char *file_name,
   FILE *fp;
 
   register_temp_file (tmpdir, file_name);
-  fp = fopen_temp (file_name, "w");
+  fp = fopen_temp (file_name, "we");
   if (fp == NULL)
     {
       error (0, errno, _("failed to create \"%s\""), file_name);
index 4f49bd95d3ac03c81c804d021f3687a32b081e70..fccdaac98e348ba1ef3c5c9e8d4b424b12d27f04 100644 (file)
@@ -22,6 +22,7 @@ xmalloca
 getline
 xconcat-filename
 fwriteerror
+fopen-gnu
 clean-temp
 stat
 error