aboutsummaryrefslogtreecommitdiff
path: root/write_or_die.c
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2012-10-25 06:43:01 -0400
committerJeff King <peff@peff.net>2012-10-25 06:43:01 -0400
commitbbbd0573895f7f79aeb1faa5c0333915947096c0 (patch)
treebc89be8a152a431c639d1bd389e11910464e4208 /write_or_die.c
parent33d3c6bb9bcc10b9aa5e46f66ef516c649b2c703 (diff)
parent84adb641545f4b58f9276adf099f840ea2928e44 (diff)
downloadgit-bbbd0573895f7f79aeb1faa5c0333915947096c0.tar.gz
git-bbbd0573895f7f79aeb1faa5c0333915947096c0.tar.xz
Merge branch 'js/mingw-fflush-errno'
* js/mingw-fflush-errno: maybe_flush_or_die: move a too-loose Windows specific error
Diffstat (limited to 'write_or_die.c')
-rw-r--r--write_or_die.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/write_or_die.c b/write_or_die.c
index d45b53602..960f448cf 100644
--- a/write_or_die.c
+++ b/write_or_die.c
@@ -34,12 +34,7 @@ void maybe_flush_or_die(FILE *f, const char *desc)
return;
}
if (fflush(f)) {
- /*
- * On Windows, EPIPE is returned only by the first write()
- * after the reading end has closed its handle; subsequent
- * write()s return EINVAL.
- */
- if (errno == EPIPE || errno == EINVAL)
+ if (errno == EPIPE)
exit(0);
die_errno("write failure on '%s'", desc);
}