mirror of
https://github.com/AuxXxilium/eudev.git
synced 2024-12-22 15:03:34 +07:00
main: make sure we don't accidentally acquire a controlling terminal
This commit is contained in:
parent
ea5652c296
commit
affda78706
2
main.c
2
main.c
@ -191,7 +191,7 @@ static int console_setup(bool do_reset) {
|
||||
|
||||
release_terminal();
|
||||
|
||||
if ((tty_fd = open_terminal("/dev/console", O_WRONLY)) < 0) {
|
||||
if ((tty_fd = open_terminal("/dev/console", O_WRONLY|O_NOCTTY)) < 0) {
|
||||
log_error("Failed to open /dev/console: %s", strerror(-tty_fd));
|
||||
r = -tty_fd;
|
||||
goto finish;
|
||||
|
@ -68,7 +68,7 @@ static int enable_special_signals(Manager *m) {
|
||||
if (reboot(RB_DISABLE_CAD) < 0)
|
||||
log_warning("Failed to enable ctrl-alt-del handling: %m");
|
||||
|
||||
if ((fd = open_terminal("/dev/tty0", O_RDWR)) < 0)
|
||||
if ((fd = open_terminal("/dev/tty0", O_RDWR|O_NOCTTY)) < 0)
|
||||
log_warning("Failed to open /dev/tty0: %m");
|
||||
else {
|
||||
/* Enable that we get SIGWINCH on kbrequest */
|
||||
|
Loading…
Reference in New Issue
Block a user