Browse code

- EINTR handled for tcp write (andrei)

Andrei Pelinescu-Onciul authored on 14/04/2003 20:26:27
Showing 3 changed files
... ...
@@ -21,7 +21,7 @@
21 21
 VERSION = 0
22 22
 PATCHLEVEL = 8
23 23
 SUBLEVEL =   11
24
-EXTRAVERSION = pre18
24
+EXTRAVERSION = pre19
25 25
 
26 26
 RELEASE=$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)
27 27
 OS = $(shell uname -s | sed -e s/SunOS/solaris/ | tr "[A-Z]" "[a-z]")
... ...
@@ -100,7 +100,7 @@ optimizations:
100 100
 
101 101
 tcp stuff:
102 102
 x tcp disable nagle 
103
-- set TOS to minimize delay
103
+x set TOS to minimize delay
104 104
 - tcp locking/atomic ops review
105 105
 - tcp fix simultaneous connects (ser process is blocked until connect timeouts
106 106
  => possible DOS)
... ...
@@ -440,6 +440,8 @@ send_it:
440 440
 	DBG("tcp_send: after write: c= %p n=%d fd=%d\n",c, n, fd);
441 441
 	DBG("tcp_send: buf=\n%.*s\n", (int)len, buf);
442 442
 	if (n<0){
443
+		if (errno==EINTR) goto send_it; /* interrupted write, try again*/
444
+										/* keep the lock or lock/unlock again?*/
443 445
 		LOG(L_ERR, "ERROR: tcpsend: failed to send, n=%d: %s (%d)\n",
444 446
 				n, strerror(errno), errno);
445 447
 		/* error on the connection , mark it as bad and set 0 timeout */