qga: replace pipe() with g_unix_open_pipe(CLOEXEC)

Suggested-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
Marc-André Lureau 2022-04-22 14:46:36 +04:00
parent 81badab381
commit ed78331dda

View file

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