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:
Ray Strode 2022-10-28 10:12:58 -04:00
parent 9635fd4e40
commit 356676bc5e

View File

@ -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;
}