Merge branch 'ja/i18n-fix'
[gitweb.git] / credential.c
index 924ab58538accd8815d8a7c39d5c42ba9441f28e..62be651b03b55ee4d478706e51ea8606b10739f0 100644 (file)
@@ -1,9 +1,11 @@
 #include "cache.h"
+#include "config.h"
 #include "credential.h"
 #include "string-list.h"
 #include "run-command.h"
 #include "url.h"
 #include "prompt.h"
+#include "sigchain.h"
 
 void credential_init(struct credential *c)
 {
@@ -226,8 +228,10 @@ static int run_credential_helper(struct credential *c,
                return -1;
 
        fp = xfdopen(helper.in, "w");
+       sigchain_push(SIGPIPE, SIG_IGN);
        credential_write(c, fp);
        fclose(fp);
+       sigchain_pop(SIGPIPE);
 
        if (want_output) {
                int r;