Commit fe43c001 authored by Dag Erling Smørgrav's avatar Dag Erling Smørgrav

Correct the error check for write().

git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@892 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent d8ef2b98
......@@ -193,8 +193,10 @@ do_write(struct VSL_data *vd, const char *w_opt)
break;
if (i > 0) {
i = write(fd, p, 5 + p[1]);
if (i != 1)
if (i < 0) {
perror(w_opt);
exit(1);
}
}
}
exit (0);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment