Fix #84: Reset TTY w/ stty() before taking any pre-getty action

This patch moves the stty() function from getty.c to a separate file so
it can be called from exec.c as well.  The fix to #84 is simply to call
stty() in prepare_tty(), which is shared by run_getty() and run_getty2()
and called before "Please press Enter ...".

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
Joachim Nilsson committed 2017-10-29 11:59:48 +01:00
1 parent b45c3d5cb8
commit 250e26f2f6
5 files changed
+79 -39

No files matched your search

+2
View File
@@ -48,6 +48,8 @@ struct fstab *getfsent (void);
char *strip_line (char *line);
int stty (int fd, unsigned int speed);
int pid_alive (pid_t pid);
char *pid_get_name (pid_t pid, char *name, size_t len);