mirror of
https://github.com/irssi/irssi.git
synced 2025-02-02 15:08:01 -05:00
Removed execute(), not used.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@3107 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
parent
e2f6f48f62
commit
25fdeeaa8d
@ -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)
|
||||
|
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user