diff options
author | TingPing <tingping@tingping.se> | 2014-04-25 13:41:38 -0400 |
---|---|---|
committer | TingPing <tingping@fedoraproject.org> | 2014-06-04 10:38:23 -0400 |
commit | 5849a0588e7b12003f8b9afcfcdc31f46c6b2329 (patch) | |
tree | 0eb7fa462318506be8b4303a9b32cb6a888c47cf /src/common/hexchat.c | |
parent | b8c02f71d9bbaf805534d5327d8c3935a3b87636 (diff) |
Use glib to parse and launch commands for util_exec
Fixes #958
Diffstat (limited to 'src/common/hexchat.c')
-rw-r--r-- | src/common/hexchat.c | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/src/common/hexchat.c b/src/common/hexchat.c index 8729df33..3afe5f75 100644 --- a/src/common/hexchat.c +++ b/src/common/hexchat.c @@ -991,47 +991,12 @@ hexchat_exit (void) fe_exit (); } -#ifndef WIN32 - -static int -child_handler (gpointer userdata) -{ - int pid = GPOINTER_TO_INT (userdata); - - if (waitpid (pid, 0, WNOHANG) == pid) - return 0; /* remove timeout handler */ - return 1; /* keep the timeout handler */ -} - -#endif - void hexchat_exec (const char *cmd) { -#ifdef WIN32 util_exec (cmd); -#else - int pid = util_exec (cmd); - if (pid != -1) - /* zombie avoiding system. Don't ask! it has to be like this to work - with zvt (which overrides the default handler) */ - fe_timeout_add (1000, child_handler, GINT_TO_POINTER (pid)); -#endif } -void -hexchat_execv (char * const argv[]) -{ -#ifdef WIN32 - util_execv (argv); -#else - int pid = util_execv (argv); - if (pid != -1) - /* zombie avoiding system. Don't ask! it has to be like this to work - with zvt (which overrides the default handler) */ - fe_timeout_add (1000, child_handler, GINT_TO_POINTER (pid)); -#endif -} static void set_locale (void) |