windows support: remove the last fork

This commit is contained in:
Andy Williams 2015-01-27 22:41:36 +00:00
parent 203f2619e1
commit d65bc3bce9
1 changed files with 9 additions and 6 deletions

View File

@ -46,13 +46,16 @@ static void
_item_menu_xdgopen_cb(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, _item_menu_xdgopen_cb(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
void *event_info EINA_UNUSED) void *event_info EINA_UNUSED)
{ {
int pid = fork(); char *cmd;
int cmdlen;
const char *format = "xdg-open \"%s\"";
if (pid == 0) cmdlen = strlen(format) + strlen(_menu_cb_path) - 1;
{ cmd = malloc(sizeof(char) * cmdlen);
execlp("/usr/bin/xdg-open", "xdg-open", _menu_cb_path, NULL); snprintf(cmd, cmdlen, format, _menu_cb_path);
exit(0);
} ecore_exe_run(cmd, NULL);
free(cmd);
} }
static void static void