AP_HAL_Linux: UARTDevice: never be the controlling terminal

If we are the controlling terminal for a tty device we will receive a
SIGHUP when the device disappears. Currently what happens is that we
simply stop the whole process. We don't want to fall off the sky due
to a bad device. This can happen for any reason, but it's more likely
if the UART is behind a USB connection.
This commit is contained in:
Lucas De Marchi 2017-09-27 16:44:56 -07:00 committed by Randy Mackay
parent 78d1c55685
commit 1d6b88ee68

View File

@ -33,7 +33,7 @@ bool UARTDevice::close()
bool UARTDevice::open()
{
_fd = ::open(_device_path, O_RDWR | O_CLOEXEC);
_fd = ::open(_device_path, O_RDWR | O_CLOEXEC | O_NOCTTY);
if (_fd < 0) {
::fprintf(stderr, "Failed to open UART device %s - %s\n",