Refactor TTY code to honor runlevels and use I/O plugin to watch /dev

Add support for runlevels to tty command and support for reading baud
rate and TERM variable from finit.conf.

The tty-watcher thread has been converted to a standard I/O plugin.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
Joachim Nilsson committed 2013-06-06 18:19:26 +02:00
1 parent f97aab4699
commit 0f60aa2289
13 files changed
+391 -144

No files matched your search

+9 -2
View File
@@ -505,7 +505,7 @@ int run_interactive(char *cmd, char *fmt, ...)
return status;
}
pid_t run_getty(char *cmd, int console)
pid_t run_getty(char *cmd, char *args[], int console)
{
pid_t pid = fork();
@@ -557,7 +557,7 @@ pid_t run_getty(char *cmd, int console)
if (fexist(SYNC_STOPPED))
continue;
run(cmd);
execv(cmd, args);
}
exit(0);
@@ -657,6 +657,13 @@ void chomp(char *str)
*x = 0;
}
/* Signal safe sleep ... we get a lot of SIGCHLD at reboot */
void do_sleep(unsigned int sec)
{
while ((sec = sleep(sec)))
;
}
void set_hostname(char *hostname)
{
FILE *fp;