Changeset 7177
- Timestamp:
- 07/14/12 23:10:33 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/csctapi/io_serial.c
r7175 r7177 454 454 455 455 while (readed <0 && errorcount < 10) { 456 AGAIN: 456 457 readed = read (reader->handle, &c, 1); 457 458 if (readed < 0) { 459 if (errno == EAGAIN || errno == EINTR) 460 goto AGAIN; 458 461 int saved_errno = errno; 459 462 rdr_log(reader, "ERROR: %s (errno=%d %s)", __func__, errno, strerror(errno)); … … 509 512 int32_t u = write (reader->handle, data_w+(to_send-to_do), to_do); 510 513 if (u < 1) { 511 if (errno==EINTR ) continue; //try again in case of Interrupted system call514 if (errno==EINTR || errno==EAGAIN) continue; //try again in case of Interrupted system call 512 515 errorcount++; 513 516 //tcflush (reader->handle, TCIFLUSH);
Note:
See TracChangeset
for help on using the changeset viewer.