mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-22 18:22:11 +01: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:
parent
9635fd4e40
commit
356676bc5e
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user