summaryrefslogtreecommitdiff
path: root/tty.c
diff options
context:
space:
mode:
Diffstat (limited to 'tty.c')
-rw-r--r--tty.c6
1 files changed, 5 insertions, 1 deletions
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;
}