mirror of
https://github.com/nmap/nmap.git
synced 2026-10-20 19:01:56 +00:00
Don't bother with interactive input if we can't open the TTY. See #2042
This commit is contained in:
parent
6fd0261731
commit
10862c46e8
1 changed files with 4 additions and 1 deletions
|
|
@ -224,7 +224,10 @@ void tty_init()
|
|||
if (tty_fd)
|
||||
return;
|
||||
|
||||
if ((tty_fd = open("/dev/tty", O_RDONLY | O_NONBLOCK)) < 0) return;
|
||||
if ((tty_fd = open("/dev/tty", O_RDONLY | O_NONBLOCK)) < 0) {
|
||||
o.noninteractive = true;
|
||||
return;
|
||||
}
|
||||
|
||||
#ifndef __CYGWIN32__
|
||||
if (tcgetpgrp(tty_fd) != getpgrp()) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue