r892 - trunk/varnish-cache/bin/varnishlog

des at projects.linpro.no des at projects.linpro.no
Tue Aug 22 11:37:58 CEST 2006


Author: des
Date: 2006-08-22 11:37:58 +0200 (Tue, 22 Aug 2006)
New Revision: 892

Modified:
   trunk/varnish-cache/bin/varnishlog/varnishlog.c
Log:
Correct the error check for write().

Modified: trunk/varnish-cache/bin/varnishlog/varnishlog.c
===================================================================
--- trunk/varnish-cache/bin/varnishlog/varnishlog.c	2006-08-22 09:31:34 UTC (rev 891)
+++ trunk/varnish-cache/bin/varnishlog/varnishlog.c	2006-08-22 09:37:58 UTC (rev 892)
@@ -193,8 +193,10 @@
 			break;
 		if (i > 0) {
 			i = write(fd, p, 5 + p[1]);
-			if (i != 1)
+			if (i < 0) {
 				perror(w_opt);
+				exit(1);
+			}
 		}
 	}
 	exit (0);




More information about the varnish-commit mailing list