mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-01 23:13:40 +02:00
Switch all open() calls to use g_open()
Because it now handles EINTR. And we should do so. While most people use Linux, which tries very hard to avoid propagating EINTR back up into userspace, it can still happen. https://bugzilla.gnome.org/show_bug.cgi?id=682833
This commit is contained in:
@@ -28,6 +28,7 @@
|
||||
#endif
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <glib/gstdio.h>
|
||||
|
||||
#undef G_LOG_DOMAIN
|
||||
#define G_LOG_DOMAIN "GLib-Genmarshal"
|
||||
@@ -848,7 +849,7 @@ main (int argc,
|
||||
/* Mostly for Win32. This is equivalent to opening /dev/stdin */
|
||||
fd = dup (0);
|
||||
else
|
||||
fd = open (file, O_RDONLY);
|
||||
fd = g_open (file, O_RDONLY, 0);
|
||||
|
||||
if (fd < 0)
|
||||
{
|
||||
|
Reference in New Issue
Block a user