commit 55796e271954ed6b79b705bd864862233e7b12b3
parent a5e2377fb86a525992a2bf0c72efda1bcb6b4b58
Author: leitner <leitner>
Date: Mon, 23 Jun 2003 14:21:53 +0000
exec sulogin directly
Diffstat:
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/shutdown.c b/shutdown.c
@@ -244,8 +244,10 @@ int main(int argc, char *const argv[]) {
kill(-1, SIGKILL);
if (cfg_sulogin) {
- exec_cmd("/sbin/sulogin", "sulogin", (char *) 0);
- return 0;
+ char* suargs[]={"sulogin",0};
+ execve("/sbin/sulogin", suargs, 0);
+ __write2("execve() /sbin/sulogin failed\n");
+ return 1;
}
/* sync buffers */