diff --git a/src/helpers.c b/src/helpers.c index 56f3aab1..f5913a2d 100644 --- a/src/helpers.c +++ b/src/helpers.c @@ -115,7 +115,7 @@ static void add_console(char *cons) } /* this requires we have /dev mounted && a device there */ - fds[num_cons] = open(path, O_WRONLY); + fds[num_cons] = open(path, O_WRONLY | O_NOCTTY); if (fds[num_cons] < 0) { _pe("Failed opening console %s", path); return; diff --git a/src/tty.c b/src/tty.c index 408b1a1c..1fbb902e 100644 --- a/src/tty.c +++ b/src/tty.c @@ -229,7 +229,7 @@ int tty_exists(char *dev) struct termios c; int fd, rc; - fd = open(dev, O_RDWR); + fd = open(dev, O_RDWR | O_NOCTTY); if (-1 == fd) return 0;