Support for starting finit-getty with a given user

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
Joachim Nilsson committed 2016-09-04 20:02:59 +02:00
1 parent 47f3e2ca04
commit 79207dcb22
2 files changed
+9 -5

No files matched your search

+3 -3
View File
@@ -38,6 +38,8 @@
#define NUM_ARGS 16
int getty(char *tty, char *baud, char *term, char *user);
/* Wait for process completion, returns status of waitpid(2) syscall */
int complete(char *cmd, int pid)
@@ -213,8 +215,6 @@ int run_interactive(char *cmd, char *fmt, ...)
return status;
}
int getty(char *tty, char *baud, char *term);
pid_t run_getty(char *tty, char *speed, char *term, int console)
{
pid_t pid;
@@ -233,7 +233,7 @@ pid_t run_getty(char *tty, char *speed, char *term, int console)
else
prctl(PR_SET_NAME, "finit-getty", 0, 0, 0);
_exit(getty(tty, speed, term));
_exit(getty(tty, speed, term, NULL));
}
return pid;