chiark / gitweb /
terminal-util: when resetting terminals, don't wait for carrier
authorLennart Poettering <lennart@poettering.net>
Mon, 3 Aug 2015 17:04:08 +0000 (19:04 +0200)
committerSven Eden <yamakuzure@gmx.net>
Tue, 14 Mar 2017 09:18:46 +0000 (10:18 +0100)
commit1c73380d942469b7d69bdfe0e1f440bfb3cc9e38
tree74dcad918e95fdba34babcbded15288026406022
parent99104c41f2c5d0154c0e73ef0e08957d5bbfe9ec
terminal-util: when resetting terminals, don't wait for carrier

In case of non-CLOCAL lines (i.e. those with carrier detect configured)
we shouldnt wait for a carrier if all we try to do is reset the TTY.
Hence, whenever we open such a TTY pass O_NONBLOCK.

Note that we continue to open ttys we intend to write to without
O_ONBLOCK, we only add it in cases we invoke ioctl()s or other terminal
operations without reading or writing to the device.

Fixes #835.
src/basic/terminal-util.c