rs

FTDI serial communication program
git clone git://git.2f30.org/rs
Log | Files | Refs | README | LICENSE

commit 425e572b433f96a53a851d26aee2885081b2e030
parent 372bacfb3a6706b6bc68c721f6fecd1daf7f472f
Author: sin <sin@2f30.org>
Date:   Wed, 11 Dec 2013 12:22:08 +0000

Restart in case of EINTR

Diffstat:
Mrs.c | 2++
1 file changed, 2 insertions(+), 0 deletions(-)

diff --git a/rs.c b/rs.c @@ -65,6 +65,8 @@ loop(void) while (!done) { n = read(STDIN_FILENO, buf, sizeof(buf)); + if (n < 0 && errno == EINTR) + continue; if (n > 0) ftdi_write_data(&ftdictx, buf, n); n = ftdi_read_data(&ftdictx, buf, sizeof(buf));