From 25fdeeaa8d82af319b655e3da426c3c6952caa1e Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Fri, 31 Jan 2003 04:03:06 +0000 Subject: [PATCH] Removed execute(), not used. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@3107 dbcabf3a-b0e7-0310-adc4-f8d773084564 --- src/core/misc.c | 31 ------------------------------- src/core/misc.h | 2 -- 2 files changed, 33 deletions(-) diff --git a/src/core/misc.c b/src/core/misc.c index 4f316786..0c36bf6b 100644 --- a/src/core/misc.c +++ b/src/core/misc.c @@ -173,37 +173,6 @@ int strarray_find(char **array, const char *item) return -1; } -int execute(const char *cmd) -{ - char **args; -#ifndef WIN32 - int pid; -#endif - - g_return_val_if_fail(cmd != NULL, -1); - -#ifndef WIN32 - pid = fork(); - if (pid == -1) return FALSE; - if (pid != 0) { - pidwait_add(pid); - return pid; - } - - args = g_strsplit(cmd, " ", -1); - execvp(args[0], args); - g_strfreev(args); - - _exit(99); - return -1; -#else - args = g_strsplit(cmd, " ", -1); - _spawnvp(_P_DETACH, args[0], args); - g_strfreev(args); - return 0; -#endif -} - GSList *gslist_find_string(GSList *list, const char *key) { for (list = list; list != NULL; list = list->next) diff --git a/src/core/misc.h b/src/core/misc.h index 7eee01a2..37a3953d 100644 --- a/src/core/misc.h +++ b/src/core/misc.h @@ -21,8 +21,6 @@ int strarray_length(char **array); /* return index of `item' in `array' or -1 if not found */ int strarray_find(char **array, const char *item); -int execute(const char *cmd); /* returns pid or -1 = error */ - GSList *gslist_find_string(GSList *list, const char *key); GSList *gslist_find_icase_string(GSList *list, const char *key); GList *glist_find_string(GList *list, const char *key);