Let su report something more useful when shells fail to exec()
This commit is contained in:
parent
d4f8286997
commit
1c88703f7b
1 changed files with 2 additions and 0 deletions
|
@ -145,8 +145,10 @@ char *argv[];
|
|||
*envp = NULL;
|
||||
(void) chdir(pwd->pw_dir);
|
||||
execve(shell, argv, envv);
|
||||
perror(shell);
|
||||
} else {
|
||||
execv(shell, argv);
|
||||
perror(shell);
|
||||
}
|
||||
fprintf(stderr, "No shell\n");
|
||||
return(3);
|
||||
|
|
Loading…
Reference in a new issue