Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
Merge branch 'eb/cred-helper-ignore-sigpipe' into next
author
Junio C Hamano
<gitster@pobox.com>
Fri, 30 Mar 2018 19:42:03 +0000
(12:42 -0700)
committer
Junio C Hamano
<gitster@pobox.com>
Fri, 30 Mar 2018 19:42:03 +0000
(12:42 -0700)
When credential helper exits very quickly without reading its
input, it used to cause Git to die with SIGPIPE, which has been
fixed.
* eb/cred-helper-ignore-sigpipe:
credential: ignore SIGPIPE when writing to credential helpers
credential.c
patch
|
blob
|
history
raw
(from parent 1:
4f13731
)
diff --git
a/credential.c
b/credential.c
index 9747f47b18bf2e622f11f41889faaa4b1845ac8d..62be651b03b55ee4d478706e51ea8606b10739f0 100644
(file)
--- a/
credential.c
+++ b/
credential.c
@@
-5,6
+5,7
@@
#include "run-command.h"
#include "url.h"
#include "prompt.h"
+#include "sigchain.h"
void credential_init(struct credential *c)
{
@@
-227,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;