termios VMIN VTIME and blocking/non-blocking read operations

后端 未结 3 1699
眼角桃花
眼角桃花 2021-01-12 18:29

I am trying to write a simple C serial communication program for Linux. I am confused about the blocking/non-blocking reads and VMIN/VTIME relationships.

My question

3条回答
  •  臣服心动
    2021-01-12 19:28

    Make sure to unset the FNDELAY flag for descriptor using fcntl, otherwise VMIN/VTIME are ignored. Serial Programming Guide for POSIX Operating Systems

提交回复
热议问题