[hackers] [ubase] Ensure a select() failure is properly signalled to the caller || sin
commit d3e332c72d415d1c64dcea1ef6928a7c60e3c132
Author: sin <sin_AT_2f30.org>
Date: Wed Jun 11 13:03:33 2014 +0100
Ensure a select() failure is properly signalled to the caller
diff --git a/dd.c b/dd.c
index 25bce65..79c20d4 100644
--- a/dd.c
+++ b/dd.c
_AT_@ -162,7 +162,8 @@ copy_splice(struct dd_config *ddc)
FD_ZERO(&wfd);
FD_SET(ifd, &rfd);
FD_SET(ofd, &wfd);
- if (select(ifd > ofd ? ifd + 1 : ofd + 1, &rfd, &wfd, NULL, NULL) < 0) {
+ r = select(ifd > ofd ? ifd + 1 : ofd + 1, &rfd, &wfd, NULL, NULL);
+ if (r < 0) {
ddc->saved_errno = errno;
break;
}
Received on Wed Jun 11 2014 - 14:08:20 CEST
This archive was generated by hypermail 2.3.0
: Wed Jun 11 2014 - 14:12:09 CEST