From dc6a00a52f6df3c7e66c6535c2489f51fa1fa13a Mon Sep 17 00:00:00 2001 From: Rich Felker Date: Thu, 5 Oct 2006 21:05:12 +0000 Subject: use $SHELL --- tty.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'tty.c') diff --git a/tty.c b/tty.c index 8a2ccda..a430f0f 100644 --- a/tty.c +++ b/tty.c @@ -50,7 +50,11 @@ int uutty_open(char **cmd, int w, int h) if (pts > 2) close(pts); // FIXME............................ if (cmd) execvp(cmd[0], cmd); - else execl("/bin/sh", "-sh", (char *)0); + else { + char *s = getenv("SHELL"); + if (!s) s = "/bin/sh"; + execl(s, s, (char *)0); + } return 1; } -- cgit v1.2.3