r2148 - branches/1.1/bin/varnishd

des at projects.linpro.no des at projects.linpro.no
Fri Oct 19 13:42:50 CEST 2007


Author: des
Date: 2007-10-19 13:42:50 +0200 (Fri, 19 Oct 2007)
New Revision: 2148

Modified:
   branches/1.1/bin/varnishd/cache_pipe.c
Log:
Partial merge of r2025: Assert return values of system{calls,functions}


Modified: branches/1.1/bin/varnishd/cache_pipe.c
===================================================================
--- branches/1.1/bin/varnishd/cache_pipe.c	2007-10-19 11:42:26 UTC (rev 2147)
+++ branches/1.1/bin/varnishd/cache_pipe.c	2007-10-19 11:42:50 UTC (rev 2148)
@@ -50,16 +50,16 @@
 
 	i = read(fds[idx].fd, buf, sizeof buf);
 	if (i <= 0 || fds[1-idx].events == 0) {
-		shutdown(fds[idx].fd, SHUT_RD);
-		shutdown(fds[1-idx].fd, SHUT_WR);
+		AZ(shutdown(fds[idx].fd, SHUT_RD));
+		AZ(shutdown(fds[1-idx].fd, SHUT_WR));
 		fds[idx].events = 0;
 		return;
 	}
 	for (p = buf; i > 0; i -= j, p += j) {
 		j = write(fds[1-idx].fd, p, i);
 		if (j != i) {
-			shutdown(fds[idx].fd, SHUT_WR);
-			shutdown(fds[1-idx].fd, SHUT_RD);
+			AZ(shutdown(fds[idx].fd, SHUT_WR));
+			AZ(shutdown(fds[1-idx].fd, SHUT_RD));
 			fds[1-idx].events = 0;
 			return;
 		}




More information about the varnish-commit mailing list