diff options
author | Rich Felker <dalias@aerifal.cx> | 2006-10-05 21:05:12 +0000 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2006-10-05 21:05:12 +0000 |
commit | dc6a00a52f6df3c7e66c6535c2489f51fa1fa13a (patch) | |
tree | 63a501e515b3579fee35748a08294b94c56f10e5 /tty.c | |
parent | 98f8b3709355fd0f3e05952cee3ec54ec2d0b5ba (diff) |
use $SHELL
Diffstat (limited to 'tty.c')
-rw-r--r-- | tty.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -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; } |