mirror of
https://github.com/troglobit/finit.git
synced 2026-10-07 16:14:21 +07:00
Reorder functions a bit, group run_getty*() family
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
+13
-13
@@ -227,19 +227,6 @@ static void prepare_tty(char *tty, char *procname, int console)
|
||||
prctl(PR_SET_NAME, procname, 0, 0, 0);
|
||||
}
|
||||
|
||||
pid_t run_getty(char *tty, char *speed, char *term, int noclear, int console)
|
||||
{
|
||||
pid_t pid;
|
||||
|
||||
pid = fork();
|
||||
if (!pid) {
|
||||
prepare_tty(tty, "finit-getty", console);
|
||||
_exit(getty(tty, speed, term, NULL));
|
||||
}
|
||||
|
||||
return pid;
|
||||
}
|
||||
|
||||
static int activate_console(int nowait)
|
||||
{
|
||||
if (nowait)
|
||||
@@ -267,6 +254,19 @@ static int activate_console(int nowait)
|
||||
return 0;
|
||||
}
|
||||
|
||||
pid_t run_getty(char *tty, char *speed, char *term, int noclear, int console)
|
||||
{
|
||||
pid_t pid;
|
||||
|
||||
pid = fork();
|
||||
if (!pid) {
|
||||
prepare_tty(tty, "finit-getty", console);
|
||||
_exit(getty(tty, speed, term, NULL));
|
||||
}
|
||||
|
||||
return pid;
|
||||
}
|
||||
|
||||
pid_t run_getty2(char *tty, char *cmd, char *args[], int nowait, int console)
|
||||
{
|
||||
pid_t pid;
|
||||
|
||||
Reference in New Issue
Block a user