mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 00:33:55 -06:00
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:
parent
ad24b679d2
commit
a7241974ce
4 changed files with 4 additions and 29 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue