diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2023-03-25 12:14:36 -0700 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2023-03-25 12:14:36 -0700 |
commit | a353f02a7ac4504ad5edb5407278c7a03c507aef (patch) | |
tree | 6b3e1e2816cf308337905bd5c628932f3b685d55 /src/file.c | |
parent | 81dc4a481b64499ab7c355ee43c91e4fe0767545 (diff) |
If O_CLOEXEC is defined, add "e" to fopen modes
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Diffstat (limited to 'src/file.c')
-rw-r--r-- | src/file.c | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -1019,7 +1019,7 @@ XcursorFilenameLoadImage (const char *file, int size) if (!file || size < 0) return NULL; - f = fopen (file, "r"); + f = fopen (file, "r" FOPEN_CLOEXEC); if (!f) return NULL; image = XcursorFileLoadImage (f, size); @@ -1036,7 +1036,7 @@ XcursorFilenameLoadImages (const char *file, int size) if (!file || size < 0) return NULL; - f = fopen (file, "r"); + f = fopen (file, "r" FOPEN_CLOEXEC); if (!f) return NULL; images = XcursorFileLoadImages (f, size); @@ -1053,7 +1053,7 @@ XcursorFilenameLoadAllImages (const char *file) if (!file) return NULL; - f = fopen (file, "r"); + f = fopen (file, "r" FOPEN_CLOEXEC); if (!f) return NULL; images = XcursorFileLoadAllImages (f); @@ -1072,7 +1072,7 @@ XcursorFilenameLoad (const char *file, if (!file) return XcursorFalse; - f = fopen (file, "r"); + f = fopen (file, "r" FOPEN_CLOEXEC); if (!f) return 0; ret = XcursorFileLoad (f, commentsp, imagesp); @@ -1089,7 +1089,7 @@ XcursorFilenameSaveImages (const char *file, const XcursorImages *images) if (!file || !images) return XcursorFalse; - f = fopen (file, "w"); + f = fopen (file, "w" FOPEN_CLOEXEC); if (!f) return 0; ret = XcursorFileSaveImages (f, images); @@ -1107,7 +1107,7 @@ XcursorFilenameSave (const char *file, if (!file || !comments || !images) return XcursorFalse; - f = fopen (file, "w"); + f = fopen (file, "w" FOPEN_CLOEXEC); if (!f) return 0; ret = XcursorFileSave (f, comments, images); |