Set VMIN = 1, not zero which forces non-blocking reads.
This commit is contained in:
parent
afb518f04a
commit
8fbf876dfd
|
@ -34,6 +34,7 @@
|
||||||
#include <tchar.h>
|
#include <tchar.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#else
|
#else
|
||||||
|
#include <limits.h>
|
||||||
#include <termios.h>
|
#include <termios.h>
|
||||||
#include <sys/ioctl.h>
|
#include <sys/ioctl.h>
|
||||||
#endif
|
#endif
|
||||||
|
@ -700,7 +701,7 @@ enum sp_return sp_open(struct sp_port *port, enum sp_mode flags)
|
||||||
data.term.c_oflag &= ~OFILL;
|
data.term.c_oflag &= ~OFILL;
|
||||||
#endif
|
#endif
|
||||||
data.term.c_lflag &= ~(ISIG | ICANON | ECHO | IEXTEN);
|
data.term.c_lflag &= ~(ISIG | ICANON | ECHO | IEXTEN);
|
||||||
data.term.c_cc[VMIN] = 0;
|
data.term.c_cc[VMIN] = 1;
|
||||||
data.term.c_cc[VTIME] = 0;
|
data.term.c_cc[VTIME] = 0;
|
||||||
|
|
||||||
/* Ignore modem status lines; enable receiver; leave control lines alone on close. */
|
/* Ignore modem status lines; enable receiver; leave control lines alone on close. */
|
||||||
|
|
Loading…
Reference in New Issue