]> Zhao Yanbai Git Server - minix.git/commitdiff
Let su report something more useful when shells fail to exec()
authorBen Gras <ben@minix3.org>
Mon, 27 Mar 2006 11:08:17 +0000 (11:08 +0000)
committerBen Gras <ben@minix3.org>
Mon, 27 Mar 2006 11:08:17 +0000 (11:08 +0000)
commands/simple/su.c

index a58ba71bf32c4dd9acbebeebe1ad8e8364a6035e..53c92c24123eaf0e440223bf13d51df627ee0c9c 100755 (executable)
@@ -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);