[curl/curl] a4d25b: lib: when saving files, use advisory locks

Daniel Stenberg <[email protected]>
Newsgroups gmane.comp.web.curl.cvs
Message-ID <curl/curl/push/refs/heads/bagder/lock-output-files/[email protected]>
  Branch: refs/heads/bagder/lock-output-files
  Home:   https://github.com/curl/curl
  Commit: a4d25b6ded3a9140540f8d18ed816cd3c73f5cae
      https://github.com/curl/curl/commit/a4d25b6ded3a9140540f8d18ed816cd3c73f5cae
  Author: Daniel Stenberg <[email protected]>
  Date:   2021-05-03 (Mon, 03 May 2021)

  Changed paths:
    M CMakeLists.txt
    M configure.ac
    M lib/Makefile.inc
    M lib/altsvc.c
    M lib/altsvc.h
    M lib/cookie.c
    M lib/curl_config.h.cmake
    M lib/hsts.c
    A lib/openlock.c
    A lib/openlock.h
    R lib/rename.c
    R lib/rename.h
    M lib/url.c
    M tests/unit/unit1654.c

  Log Message:
  -----------
  lib: when saving files, use advisory locks

... instead of saving into a temp name and rename. This makes them work
properly when the output is a character device. Applies to cookies,
alt-svc and hsts files.

Makes Curl_rename superfluous and therefore removed.

Reported-by: rofl0r on github
Assisted-by: Paul Vixie
Fixes #6882


_______________________________________________
curl-commits mailing list
[email protected]
https://cool.haxx.se/cgi-bin/mailman/listinfo/curl-commits
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.