diff options
author | Yuri Pudgorodskiy <yur@virtuozzo.com> | 2015-11-12 16:36:21 +0300 |
---|---|---|
committer | Michael Roth <mdroth@linux.vnet.ibm.com> | 2015-11-17 16:24:18 -0600 |
commit | 0be40839519215988e207b86bc1638de53567588 (patch) | |
tree | 755186fe3d2bc1f3cae22bddfa47d578b4fa893b /qga/commands.c | |
parent | 02a4d82e8c19267ad06b08389b5e914ba668450e (diff) |
qga: allow to lookup in PATH from the passed envp for guest-exec
This was original behaviour before GLIB gspawn() rework and we rely on
this behaviour.
Signed-off-by: Yuri Pudgorodskiy <yur@virtuozzo.com>
Signed-off-by: Denis V. Lunev <den@openvz.org>
CC: Michael Roth <mdroth@linux.vnet.ibm.com>
* add version check (2.33.2) for G_SPAWN_SEARCH_PATH_FROM_ENVP
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
Diffstat (limited to 'qga/commands.c')
-rw-r--r-- | qga/commands.c | 3 |
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; } |