mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-03 06:28:27 -04:00
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:
parent
78d1c55685
commit
1d6b88ee68
@ -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",
|
||||
|
Loading…
Reference in New Issue
Block a user