repeat for uinput, use execl to start agetty.

This commit is contained in:
sorgelig
2019-05-28 07:14:25 +08:00
parent b1a1f16575
commit ce7bda68dc
2 changed files with 102 additions and 70 deletions

View File

@@ -3952,8 +3952,8 @@ void HandleUI(void)
ttypid = fork();
if (!ttypid)
{
system("/sbin/agetty -a root -l /tmp/script --nohostname -L tty2 xterm");
exit(0);
execl("/sbin/agetty", "/sbin/agetty", "-a", "root", "-l", "/tmp/script", "--nohostname", "-L", "tty2", "xterm", NULL);
exit(0); //should never be reached
}
}
else