From 3a024ca529229b9c09b9357b4d98155123f28cb1 Mon Sep 17 00:00:00 2001 From: Sylvain LAFRASSE Date: Tue, 4 Sep 2018 20:56:21 +0200 Subject: [PATCH] Made O_NONBLOCK flag to open() call specific to macOS only. --- src/tty.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/tty.c b/src/tty.c index 277127b..d5a6bd8 100644 --- a/src/tty.c +++ b/src/tty.c @@ -537,7 +537,11 @@ int tty_connect(void) int status; /* Open tty device */ +#ifdef __APPLE__ fd = open(option.tty_device, O_RDWR | O_NOCTTY | O_NONBLOCK ); +#else + fd = open(option.tty_device, O_RDWR | O_NOCTTY); +#endif if (fd < 0) { error_printf_silent("Could not open tty device (%s)", strerror(errno));