]> sjero.net Git - wget/blobdiff - src/ChangeLog
[svn] Fix a possible race condition when opening files.
[wget] / src / ChangeLog
index 90a79d4dcd26a6c4960f46c62d2783df93c6de96..277a0edb8b85f0d5e8294ae9ab996b45acb7702b 100644 (file)
@@ -1,3 +1,23 @@
+2005-02-24  Hrvoje Niksic  <hniksic@xemacs.org>
+
+       * ftp.c (getftp): Ditto.
+
+       * http.c (gethttp): When we're not supposed to overwrite files,
+       use fopen_excl to open the file and recompute the file name.
+
+       * log.c (redirect_output): Use unique_create to avoid a race
+       condition.
+
+       * mswindows.c (fake_fork_child): Use unique_create.
+
+       * utils.c (fopen_excl): New function that opens a stdio stream
+       with the O_EXCL flag (where available).
+       (unique_create): New function, like unique_name, but also creating
+       the file and returning a file pointer.
+       (fork_to_background): Use unique_create to create the file
+       immediately to avoid race condition with multiple instances of
+       wget -b.
+
 2005-02-24  Hrvoje Niksic  <hniksic@xemacs.org>
 
        * host.c (lookup_host): Test for AI_ADDRCONFIG directly, instead