From d65bc3bce927d868adb67a01ef9b5d20c93c055b Mon Sep 17 00:00:00 2001 From: Andy Williams Date: Tue, 27 Jan 2015 22:41:36 +0000 Subject: [PATCH] windows support: remove the last fork --- src/bin/edi_filepanel.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/bin/edi_filepanel.c b/src/bin/edi_filepanel.c index 6e3600f..435fdbb 100644 --- a/src/bin/edi_filepanel.c +++ b/src/bin/edi_filepanel.c @@ -46,13 +46,16 @@ static void _item_menu_xdgopen_cb(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED) { - int pid = fork(); + char *cmd; + int cmdlen; + const char *format = "xdg-open \"%s\""; - if (pid == 0) - { - execlp("/usr/bin/xdg-open", "xdg-open", _menu_cb_path, NULL); - exit(0); - } + cmdlen = strlen(format) + strlen(_menu_cb_path) - 1; + cmd = malloc(sizeof(char) * cmdlen); + snprintf(cmd, cmdlen, format, _menu_cb_path); + + ecore_exe_run(cmd, NULL); + free(cmd); } static void