diff --git a/src/serial_posix.c b/src/serial_posix.c index aebcdc5..2b0c3fa 100644 --- a/src/serial_posix.c +++ b/src/serial_posix.c @@ -205,6 +205,11 @@ serial_close (serial_t *device) return -1; } +#ifndef ENABLE_PTY + // Disable exclusive access mode. + ioctl (device->fd, TIOCNXCL, NULL); +#endif + // Close the device. if (close (device->fd) != 0) { SYSERROR (device->context, errno);