From ed78331ddafeca55f45ce9ce8bec6c7660a6d621 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Date: Fri, 22 Apr 2022 14:46:36 +0400 Subject: [PATCH] qga: replace pipe() with g_unix_open_pipe(CLOEXEC) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Suggested-by: Daniel P. Berrangé Signed-off-by: Marc-André Lureau Reviewed-by: Daniel P. Berrangé --- qga/commands-posix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qga/commands-posix.c b/qga/commands-posix.c index 77f4672ca2..094487c2c3 100644 --- a/qga/commands-posix.c +++ b/qga/commands-posix.c @@ -2529,7 +2529,7 @@ void qmp_guest_set_user_password(const char *username, goto out; } - if (pipe(datafd) < 0) { + if (!g_unix_open_pipe(datafd, FD_CLOEXEC, NULL)) { error_setg(errp, "cannot create pipe FDs"); goto out; }