From: Colin Walters Date: Mon, 27 Aug 2012 22:22:26 +0000 (-0400) Subject: xdgmime: Handle EINTR in open() X-Git-Tag: 2.33.12~41 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2542b6f60492fadfb21f2c4a29976c3494c7e6c5;p=platform%2Fupstream%2Fglib.git xdgmime: Handle EINTR in open() https://bugzilla.gnome.org/show_bug.cgi?id=682833 --- diff --git a/gio/xdgmime/xdgmimecache.c b/gio/xdgmime/xdgmimecache.c index 0324e14..87a3cd0 100644 --- a/gio/xdgmime/xdgmimecache.c +++ b/gio/xdgmime/xdgmimecache.c @@ -34,6 +34,7 @@ #include #include +#include #include #include @@ -120,7 +121,9 @@ _xdg_mime_cache_new_from_file (const char *file_name) int minor; /* 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) return NULL;