From 1c88703f7bb2711f60235265104f6554c73325f3 Mon Sep 17 00:00:00 2001 From: Ben Gras Date: Mon, 27 Mar 2006 11:08:17 +0000 Subject: [PATCH] Let su report something more useful when shells fail to exec() --- commands/simple/su.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/commands/simple/su.c b/commands/simple/su.c index a58ba71bf..53c92c241 100755 --- a/commands/simple/su.c +++ b/commands/simple/su.c @@ -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); -- 2.44.0