Added O_NONBLOCK flag to open() call for macOS (10.13.6) compatibility.

This commit is contained in:
Sylvain LAFRASSE 2018-08-31 13:13:58 +02:00
parent 8db7bb56b5
commit 424c816118

View file

@ -537,7 +537,7 @@ int tty_connect(void)
int status;
/* Open tty device */
fd = open(option.tty_device, O_RDWR | O_NOCTTY );
fd = open(option.tty_device, O_RDWR | O_NOCTTY | O_NONBLOCK );
if (fd < 0)
{
error_printf_silent("Could not open tty device (%s)", strerror(errno));