def reconfigure(self, state=True):
"""
Allow HUPCL (hang up on close)
VMIN, VTIME = 0
"""
fd = self.fileno()
orig_attr = termios.tcgetattr(fd)
iflag, oflag, cflag, lflag, ispeed, ospeed, cc = orig_attr
cflag |= termios.HUPCL
cc[termios.VMIN] = 0
cc[termios.VTIME] = 0
termios.tcsetattr(fd, termios.TCSANOW,
[iflag, oflag, cflag, lflag, ispeed, ospeed, cc])
评论列表
文章目录