mirror of
https://github.com/MidnightCommander/mc
synced 2024-12-22 20:36:50 +03:00
Ticket #3444: (mc_popen): use the PATH environment variable
...to search for the executable when opening pipe: add the G_SPAWN_SEARCH_PATH flag to the g_spawn_async_with_pipes() call, which cause mc to use the PATH environment variable to search for the executable. Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
parent
6c33f259b6
commit
544a6b625e
@ -528,8 +528,9 @@ mc_popen (const char *command, GError ** error)
|
||||
goto ret_err;
|
||||
}
|
||||
|
||||
if (!g_spawn_async_with_pipes (NULL, argv, NULL, G_SPAWN_DO_NOT_REAP_CHILD, NULL, NULL,
|
||||
&p->child_pid, NULL, &p->out.fd, &p->err.fd, error))
|
||||
if (!g_spawn_async_with_pipes
|
||||
(NULL, argv, NULL, G_SPAWN_DO_NOT_REAP_CHILD | G_SPAWN_SEARCH_PATH, NULL, NULL,
|
||||
&p->child_pid, NULL, &p->out.fd, &p->err.fd, error))
|
||||
{
|
||||
mc_replace_error (error, MC_PIPE_ERROR_CREATE_PIPE_STREAM, "%s",
|
||||
_("Cannot create pipe streams"));
|
||||
|
Loading…
Reference in New Issue
Block a user