util: Ignore errors in clear_hupcl (allows OSX to run)
Signed-off-by: Lyle Cheatham <hello@lylecheatham.com>
This commit is contained in:
parent
f7cb0875f4
commit
1235972b77
|
@ -20,7 +20,10 @@ def set_nonblock(fd):
|
||||||
def clear_hupcl(fd):
|
def clear_hupcl(fd):
|
||||||
attrs = termios.tcgetattr(fd)
|
attrs = termios.tcgetattr(fd)
|
||||||
attrs[2] = attrs[2] & ~termios.HUPCL
|
attrs[2] = attrs[2] & ~termios.HUPCL
|
||||||
|
try:
|
||||||
termios.tcsetattr(fd, termios.TCSADRAIN, attrs)
|
termios.tcsetattr(fd, termios.TCSADRAIN, attrs)
|
||||||
|
except termios.error:
|
||||||
|
pass
|
||||||
|
|
||||||
# Support for creating a pseudo-tty for emulating a serial port
|
# Support for creating a pseudo-tty for emulating a serial port
|
||||||
def create_pty(ptyname):
|
def create_pty(ptyname):
|
||||||
|
|
Loading…
Reference in New Issue