mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-11 23:16:14 +01:00
xdgmime: Handle EINTR in open()
https://bugzilla.gnome.org/show_bug.cgi?id=682833
This commit is contained in:
parent
62570a52b1
commit
2542b6f604
@ -34,6 +34,7 @@
|
|||||||
|
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
#include <errno.h>
|
||||||
#include <fnmatch.h>
|
#include <fnmatch.h>
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
|
||||||
@ -120,7 +121,9 @@ _xdg_mime_cache_new_from_file (const char *file_name)
|
|||||||
int minor;
|
int minor;
|
||||||
|
|
||||||
/* Open the file and map it into memory */
|
/* Open the file and map it into memory */
|
||||||
fd = open (file_name, O_RDONLY|_O_BINARY, 0);
|
do
|
||||||
|
fd = open (file_name, O_RDONLY|_O_BINARY, 0);
|
||||||
|
while (fd == -1 && errno == EINTR);
|
||||||
|
|
||||||
if (fd < 0)
|
if (fd < 0)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
Loading…
Reference in New Issue
Block a user