mirror of
https://github.com/tio/tio.git
synced 2026-05-01 23:07:58 +02:00
Made O_NONBLOCK flag to open() call specific to macOS only.
This commit is contained in:
parent
eb70da83ec
commit
3a024ca529
1 changed files with 4 additions and 0 deletions
|
|
@ -537,7 +537,11 @@ int tty_connect(void)
|
||||||
int status;
|
int status;
|
||||||
|
|
||||||
/* Open tty device */
|
/* Open tty device */
|
||||||
|
#ifdef __APPLE__
|
||||||
fd = open(option.tty_device, O_RDWR | O_NOCTTY | O_NONBLOCK );
|
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)
|
if (fd < 0)
|
||||||
{
|
{
|
||||||
error_printf_silent("Could not open tty device (%s)", strerror(errno));
|
error_printf_silent("Could not open tty device (%s)", strerror(errno));
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue