Bruno Jesus : winetest: Take care of EINTR on send/recv.
Alexandre Julliard
julliard at winehq.org
Thu Jun 12 15:51:42 CDT 2014
Module: wine
Branch: master
Commit: 49ef87c3143c59e3037b8dd78b083e30643bf775
URL: http://source.winehq.org/git/wine.git/?a=commit;h=49ef87c3143c59e3037b8dd78b083e30643bf775
Author: Bruno Jesus <00cpxxx at gmail.com>
Date: Thu Jun 12 01:45:36 2014 -0300
winetest: Take care of EINTR on send/recv.
---
programs/winetest/send.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/programs/winetest/send.c b/programs/winetest/send.c
index 7767d25..d04b6e9 100644
--- a/programs/winetest/send.c
+++ b/programs/winetest/send.c
@@ -92,7 +92,10 @@ send_buf (SOCKET s, const char *buf, size_t length)
while (length > 0) {
sent = send (s, buf, length, 0);
- if (sent == SOCKET_ERROR) return 1;
+ if (sent == SOCKET_ERROR) {
+ if (errno == EINTR) continue;
+ return 1;
+ }
buf += sent;
length -= sent;
}
@@ -200,6 +203,7 @@ send_file_direct (const char *name)
total = 0;
while ((bytes_read = recv (s, buffer+total, BUFLEN-total, 0))) {
if ((signed)bytes_read == SOCKET_ERROR) {
+ if (errno == EINTR) continue;
report (R_WARNING, "Error receiving reply: %d, %d",
errno, WSAGetLastError ());
goto abort1;
More information about the wine-cvs
mailing list