git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] upload-pack: remove superfluous sigchain_pop() call

From
René Scharfe <l.s.r@web.de>
Date
Aug 11, 2020, 17:15 UTC
Message-ID
<29ac165c-8458-9bb1-7e59-e7c2c68a9f2a@web.de>

2997178ee6 (upload-pack: split check_unreachable() in two, prep for get_reachable_list(), 2016-06-12) moved most code of has_unreachable() into the new function do_reachable_revlist(). The latter takes care to ignore SIGPIPE during its operations, and restores the original signal handler before returning.

However, a sigchain_pop(SIGPIPE) call remained in the error handling code of has_unreachable(), which does nothing because the stack is empty after do_reachable_revlist() cleaned up after itself. Remove it.

Signed-off-by: René Scharfe <l.s.r@web.de>
---
 upload-pack.c | 1 -
 1 file changed, 1 deletion(-)
diff --git a/upload-pack.c b/upload-pack.c
index d087113d23e..1b068da0d26 100644
--- a/upload-pack.c
+++ b/upload-pack.c
@@ -731,7 +731,6 @@ static int has_unreachable(struct object_array *src, enum allow_uor allow_uor)
 	return 0;

 error:
-	sigchain_pop(SIGPIPE);
 	if (cmd.out >= 0)
 		close(cmd.out);
 	return 1;
--
2.28.0
Next: Taylor Blau
Message 1 of 3 in “upload-pack: remove superfluous sigchain_pop() call”
  1. upload-pack: remove superfluous sigchain_pop() callRené Scharfe, Aug 11, 2020
  2. Taylor BlauAug 11, 2020
  3. Junio C HamanoAug 11, 2020

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.