mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-07-30 05:43:28 +02:00
glib-unix: Ensure failure in recursive g_unix_open_pipe is propagated
g_unix_open_pipe sometimes recursively calls itself (to avoid getting fds assigned in the standard io fd range). Unfortunately, it fails to propagate its result to the outer most caller. This commit fixes that.
This commit is contained in:
@@ -116,8 +116,7 @@ g_unix_open_pipe (int *fds,
|
||||
close (old_fds[0]);
|
||||
close (old_fds[1]);
|
||||
|
||||
if (!result)
|
||||
g_unix_set_error_from_errno (error, errno);
|
||||
return result;
|
||||
}
|
||||
else if (ecode == 0)
|
||||
return TRUE;
|
||||
@@ -135,9 +134,6 @@ g_unix_open_pipe (int *fds,
|
||||
close (old_fds[0]);
|
||||
close (old_fds[1]);
|
||||
|
||||
if (!result)
|
||||
g_unix_set_error_from_errno (error, errno);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user