mirror of
https://github.com/troglobit/finit.git
synced 2026-10-14 10:19:36 +00:00
Support for starting finit-getty with a given user
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
1 parent
47f3e2ca04
commit
79207dcb22
2 files changed
+9
-5
No files matched your search
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user