summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBill Nottingham <notting@src.gnome.org>2002-04-26 21:35:45 +0000
committerBill Nottingham <notting@src.gnome.org>2002-04-26 21:35:45 +0000
commit1be8627c33c2a83f2aadd432c9565598c00c25fb (patch)
treee9b48faa9b7019ce048b3c478c552e2c864f3de9
parentd05e9f47035f0472ee8e4aabf1d9cb255c86e94e (diff)
use execlp/execvp
-rw-r--r--ChangeLog3
-rw-r--r--src/pty.c10
2 files changed, 6 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog
index 62ce443..137f94d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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.
diff --git a/src/pty.c b/src/pty.c
index 5d84671..42c7e3e 100644
--- a/src/pty.c
+++ b/src/pty.c
@@ -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. */