aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--qga/commands.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/qga/commands.c b/qga/commands.c
index 7644ca053a..bb73e7dfbf 100644
--- a/qga/commands.c
+++ b/qga/commands.c
@@ -401,6 +401,9 @@ GuestExec *qmp_guest_exec(const char *path,
envp = has_env ? guest_exec_get_args(env, false) : NULL;
flags = G_SPAWN_SEARCH_PATH | G_SPAWN_DO_NOT_REAP_CHILD;
+#if GLIB_CHECK_VERSION(2, 33, 2)
+ flags |= G_SPAWN_SEARCH_PATH_FROM_ENVP;
+#endif
if (!has_output) {
flags |= G_SPAWN_STDOUT_TO_DEV_NULL | G_SPAWN_STDERR_TO_DEV_NULL;
}