Added informative comment
This commit is contained in:
@@ -87,5 +87,8 @@ func setTermSettingsBaudrate(speed int, settings *unix.Termios) (error, bool) {
|
||||
}
|
||||
|
||||
func (port *unixPort) Drain() error {
|
||||
// It's not super well documented, but this is the same as calling tcdrain:
|
||||
// - https://git.musl-libc.org/cgit/musl/tree/src/termios/tcdrain.c
|
||||
// - https://elixir.bootlin.com/linux/v6.2.8/source/drivers/tty/tty_io.c#L2673
|
||||
return unix.IoctlSetInt(port.handle, unix.TCSBRK, 1)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user