ubase

suckless linux base utils
git clone git://git.2f30.org/ubase.git
Log | Files | Refs | README | LICENSE

commit d3e332c72d415d1c64dcea1ef6928a7c60e3c132
parent d2c215f9ab0878ecaae4362d83dec9ef257a16c4
Author: sin <sin@2f30.org>
Date:   Wed Jun 11 13:03:33 +0100

Ensure a select() failure is properly signalled to the caller

Diffstat:
dd.c | 3++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/dd.c b/dd.c @@ -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; }