submodule.c: report the submodule that an error occurs in
[gitweb.git] / write_or_die.c
index 49e80aa222132c3c151b79bd37749d92a12f745a..eab8c8d0b9aab55c8435b9f451efd81e715131f8 100644 (file)
@@ -1,19 +1,6 @@
 #include "cache.h"
 #include "run-command.h"
 
-static void check_pipe(int err)
-{
-       if (err == EPIPE) {
-               if (in_async())
-                       async_exit(141);
-
-               signal(SIGPIPE, SIG_DFL);
-               raise(SIGPIPE);
-               /* Should never happen, but just in case... */
-               exit(141);
-       }
-}
-
 /*
  * Some cases use stdio, but want to flush after the write
  * to get error handling (and to get better interactive
@@ -82,26 +69,3 @@ void write_or_die(int fd, const void *buf, size_t count)
                die_errno("write error");
        }
 }
-
-int write_or_whine_pipe(int fd, const void *buf, size_t count, const char *msg)
-{
-       if (write_in_full(fd, buf, count) < 0) {
-               check_pipe(errno);
-               fprintf(stderr, "%s: write error (%s)\n",
-                       msg, strerror(errno));
-               return 0;
-       }
-
-       return 1;
-}
-
-int write_or_whine(int fd, const void *buf, size_t count, const char *msg)
-{
-       if (write_in_full(fd, buf, count) < 0) {
-               fprintf(stderr, "%s: write error (%s)\n",
-                       msg, strerror(errno));
-               return 0;
-       }
-
-       return 1;
-}