Replace qemu_pipe() with g_unix_open_pipe()

GLib g_unix_open_pipe() is essentially like qemu_pipe(), available since
2.30.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
Marc-André Lureau 2022-03-29 15:21:00 +04:00
parent ad24b679d2
commit a7241974ce
4 changed files with 4 additions and 29 deletions

View file

@ -909,13 +909,14 @@ int main(int argc, char **argv)
if ((device && !verbose) || fork_process) {
#ifndef WIN32
g_autoptr(GError) err = NULL;
int stderr_fd[2];
pid_t pid;
int ret;
if (qemu_pipe(stderr_fd) < 0) {
if (!g_unix_open_pipe(stderr_fd, FD_CLOEXEC, &err)) {
error_report("Error setting up communication pipe: %s",
strerror(errno));
err->message);
exit(EXIT_FAILURE);
}