mirror of
https://github.com/Interlisp/maiko.git
synced 2026-01-15 07:54:13 +00:00
If SHELL is not set, fall back to /bin/sh so CHAT(SHELL) might work. (#424)
This commit is contained in:
parent
a18f09d788
commit
60af445afa
@ -129,6 +129,8 @@ static int ForkUnixShell(int slot, char *PtySlave, char *termtype, char *shellar
|
||||
}
|
||||
/* Start up shell -- use SHELL environment variable as long as it's in /etc/shells */
|
||||
shell = getenv("SHELL");
|
||||
if (shell == NULL) /* shell of last resort */
|
||||
shell = "/bin/sh";
|
||||
for (userShell = getusershell(); userShell != NULL && strcmp(shell, userShell) != 0; userShell = getusershell());
|
||||
if (userShell == NULL) {
|
||||
perror("$(SHELL) not found in /etc/shells");
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user