From 72eaf53e26c8a7774a80cbb34a7740db17cd5a7b Mon Sep 17 00:00:00 2001 From: Boris Faure Date: Sun, 28 May 2017 23:30:05 +0200 Subject: [PATCH] options: use ecore_exe_pipe_run() instead of fork+exec Patch provided by Vincent Torri --- src/bin/options_elm.c | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/src/bin/options_elm.c b/src/bin/options_elm.c index 01dd5542..f48b6f33 100644 --- a/src/bin/options_elm.c +++ b/src/bin/options_elm.c @@ -9,18 +9,10 @@ launch_elm_config(void *_data EINA_UNUSED, Evas_Object *_obj EINA_UNUSED, void *_event_info EINA_UNUSED) { - int pid; + Ecore_Exe *exe; - pid = fork(); - if (pid < 0) - { - ERR("unable to fork: %s", strerror(errno)); - return; - } - if (pid == 0) - { - execl("/bin/sh", "sh", "-c", "elementary_config", NULL); - } + exe = ecore_exe_pipe_run("elementary_config", ECORE_EXE_NONE, NULL); + ecore_exe_free(exe); } void