diff options
Diffstat (limited to 'git.c')
-rw-r--r-- | git.c | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -251,11 +251,12 @@ static int run_command(struct cmd_struct *p, int argc, const char **argv) return 0; /* Check for ENOSPC and EIO errors.. */ - if (ferror(stdout)) - die("write failure on standard output"); - if (fflush(stdout) || fclose(stdout)) + if (fflush(stdout)) die("write failure on standard output: %s", strerror(errno)); - + if (ferror(stdout)) + die("unknown write failure on standard output"); + if (fclose(stdout)) + die("close failed on standard output: %s", strerror(errno)); return 0; } |