diff options
author | Bill Nottingham <notting@src.gnome.org> | 2002-04-26 21:35:45 +0000 |
---|---|---|
committer | Bill Nottingham <notting@src.gnome.org> | 2002-04-26 21:35:45 +0000 |
commit | 1be8627c33c2a83f2aadd432c9565598c00c25fb (patch) | |
tree | e9b48faa9b7019ce048b3c478c552e2c864f3de9 | |
parent | d05e9f47035f0472ee8e4aabf1d9cb255c86e94e (diff) |
use execlp/execvp
-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | src/pty.c | 10 |
2 files changed, 6 insertions, 7 deletions
@@ -1,3 +1,6 @@ +2002-04-26 17:35 notting + * src/pty.c: use execlp/execvp + 2002-04-26 12:09 nalin * src/Makefile.am, src/ring.c, ring.h: add a ring buffer for storing scrollback data. @@ -104,14 +104,10 @@ vte_pty_fork_on_fd(const char *path, const char **env_add, for (i = 0; (argv[i] != NULL); i++) { args[i] = g_strdup(argv[i]); } - execv(command, args); + execvp(command, args); } else { - if (strchr(command, '/') != NULL) { - arg = g_strdup(strrchr(command, '/') + 1); - } else { - arg = g_strdup(command); - } - execl(command, arg, NULL); + arg = g_strdup(command); + execlp(command, arg, NULL); } /* Avoid calling any atexit() code. */ |