mirror of
https://github.com/troglobit/finit.git
synced 2026-10-15 10:29:35 +00:00
getty: Ignore SIGINT & C:o earlier
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
1 parent
ab760aa3ff
commit
796701c854
2 files changed
+12
-12
No files matched your search
-12
@@ -212,7 +212,6 @@ int getty(char *tty, speed_t speed, char *term, char *user)
|
||||
{
|
||||
int fd;
|
||||
char name[30];
|
||||
struct sigaction sa;
|
||||
|
||||
/* Detach from initial controlling TTY */
|
||||
vhangup();
|
||||
@@ -228,17 +227,6 @@ int getty(char *tty, speed_t speed, char *term, char *user)
|
||||
if (ioctl(STDIN_FILENO, TIOCSCTTY, 1) < 0)
|
||||
warn("Failed TIOCSCTTY");
|
||||
|
||||
/*
|
||||
* Ignore a few signals, needed to prevent Ctrl-C at login:
|
||||
* prompt and to prevent QUIT from dumping core.
|
||||
*/
|
||||
sigemptyset(&sa.sa_mask);
|
||||
sa.sa_flags = SA_RESTART;
|
||||
sa.sa_handler = SIG_IGN;
|
||||
sigaction(SIGHUP, &sa, NULL);
|
||||
sigaction(SIGINT, &sa, NULL);
|
||||
sigaction(SIGQUIT, &sa, NULL);
|
||||
|
||||
/* The getty process is responsible for the UTMP login record */
|
||||
utmp_set_login(tty, NULL);
|
||||
if (!user)
|
||||
|
||||
Reference in new issue
Block a user