Make fopen_temporary and fopen_temporary_label unlocked
This is partially a refactoring, but also makes many more places use unlocked operations implicitly, i.e. all users of fopen_temporary(). AFAICT, the uses are always for short-lived files which are not shared externally, and are just used within the same context. Locking is not necessary.
This commit is contained in:
@@ -3,7 +3,6 @@
|
||||
#include <errno.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#include <stdio_ext.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
#include "sd-messages.h"
|
||||
@@ -126,7 +125,6 @@ int machine_save(Machine *m) {
|
||||
if (r < 0)
|
||||
goto fail;
|
||||
|
||||
(void) __fsetlocking(f, FSETLOCKING_BYCALLER);
|
||||
(void) fchmod(fileno(f), 0644);
|
||||
|
||||
fprintf(f,
|
||||
|
||||
Reference in New Issue
Block a user