cookie jar updates should be atomic #4914
Closed
Labels
Comments
It should indeed be possible to create the file with a temp name and then rename it. I would propose we do it by appending a suffix to the actual name. |
We could use what Mozilla Firefox uses which iirc? is .partfile or .part |
bagder
added a commit
that referenced
this issue
Feb 14, 2020
Save the file as "[filename].part" and rename away the extension when done. Reported-by: Mike Frysinger Fixes #4914
bagder
added a commit
that referenced
this issue
Feb 16, 2020
Save the file as "[filename].part" and rename away the extension when done. Co-authored-by: Jay Satiro Reported-by: Mike Frysinger Fixes #4914
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I did this
I expected the following
other processes accessing the cookie jar should be able to rely on the file being coherent/complete. as it stands, the cookie jar is unreliable with more than one user at a time.
seems like it wouldn't be too difficult to create a tempfile using the name as a base, write to that, then do a single atomic rename.
curl/libcurl version
curl 7.66.0 (x86_64-pc-linux-gnu) libcurl/7.66.0 OpenSSL/1.1.1d zlib/1.2.11 nghttp2/1.39.2
operating system
Linux vapier 5.3.1 #1 SMP PREEMPT Fri Sep 27 00:26:44 EDT 2019 x86_64 AMD FX(tm)-4350 Quad-Core Processor AuthenticAMD GNU/Linux
The text was updated successfully, but these errors were encountered: