git/list[1] front-page[2] threads[3] people[4] search[5] about
wed 2026-10-07 16:09 UTC

Re: [PATCH v4] transport-helper, connect: use clean_on_exit to reap children on abnormal exit

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 16, 2026, 20:31 UTC
Message-ID
<xmqq4imfo6sz.fsf@gitster.g>
In-Reply-To
<20260314160814.GA918806@coredump.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 28 quoted lines
> I don't know if you want to apply it separately (since it's really a
> totally different topic) or on top (since it is only the application of
> Andrew's patch which lets us find the problem).
> ...
>  transport.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/transport.c b/transport.c
> index 107f4fa5dc..2fb4767821 100644
> --- a/transport.c
> +++ b/transport.c
> @@ -54,14 +54,14 @@ static int transport_color_config(void)
>  		return 0;
>  	initialized = 1;
>  
> -	if (!repo_config_get_string(the_repository, key, &value))
> +	if (!repo_config_get_string_tmp(the_repository, key, &value))
>  		transport_use_color = git_config_colorbool(key, value);
>  
>  	if (!want_color_stderr(transport_use_color))
>  		return 0;
>  
>  	for (size_t i = 0; i < ARRAY_SIZE(keys); i++)
> -		if (!repo_config_get_string(the_repository, keys[i], &value)) {
> +		if (!repo_config_get_string_tmp(the_repository, keys[i], &value)) {
>  			if (!value)
>  				return config_error_nonbool(keys[i]);
>  			if (color_parse(value, transport_colors[i]) < 0)
Regardless of where it goes, we need to change a bit more, it seems?
    CC transport.o
transport.c: In function 'transport_color_config':
transport.c:57:62: error: passing argument 3 of 'repo_config_get_string_tmp' from incompatible pointer type [-Wincompatible-pointer-types]
   57 |         if (!repo_config_get_string_tmp(the_repository, key, &value))
      |                                                              ^~~~~~
      |                                                              |
      |                                                              char **
In file included from transport.c:5:
config.h:644:62: note: expected 'const char **' but argument is of type 'char **'
  644 |                                const char *key, const char **dest);
      |                                                 ~~~~~~~~~~~~~^~~~
transport.c:64:74: error: passing argument 3 of 'repo_config_get_string_tmp' from incompatible pointer type [-Wincompatible-pointer-types]
   64 |                 if (!repo_config_get_string_tmp(the_repository, keys[i], &value)) {
      |                                                                          ^~~~~~
      |                                                                          |
      |                                                                          char **
config.h:644:62: note: expected 'const char **' but argument is of type 'char **'
  644 |                                const char *key, const char **dest);
      |                                                 ~~~~~~~~~~~~~^~~~
gmake: *** [Makefile:2815: transport.o] Error 1
I'll squash an obvious patch in.
 transport.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git c/transport.c w/transport.c
index 358bc38585..7985b42a74 100644
--- c/transport.c
+++ w/transport.c
@@ -47,7 +47,7 @@ static int transport_color_config(void)
 		"color.transport.reset",
 		"color.transport.rejected"
 	}, *key = "color.transport";
-	char *value;
+	const char *value;
 	static int initialized;
 
 	if (initialized)
Previous: Junio C HamanoNext: Jeff King
Message 20 of 22 in “Fix zombie children when git is PID 1 in containers”
  1. 0/1 Fix zombie children when git is PID 1 in containersAndrew Au, Feb 23, 2026
  2. 1/1 transport-helper, connect: add atexit handler to reap children on abnormal exitAndrew Au, Feb 23, 2026
  3. Kristoffer HaugsbakkFeb 23, 2026
  4. Andrew AuFeb 23, 2026
  5. transport-helper, connect: add atexit handler to reap children on abnormal exitAndrew Au, Mar 11, 2026
  6. Junio C HamanoMar 11, 2026
  7. Andrew AuMar 11, 2026
  8. Jeff KingMar 11, 2026
  9. Junio C HamanoMar 11, 2026
  10. brian m. carlsonMar 11, 2026
  11. Andrew AuMar 12, 2026
  12. transport-helper, connect: use clean_on_exit to reap children on abnormal exitAndrew Au, Mar 12, 2026
  13. Jeff KingMar 12, 2026
  14. Jeff KingMar 12, 2026
  15. Junio C HamanoMar 12, 2026
  16. transport-helper, connect: use clean_on_exit to reap children on abnormal exitAndrew Au, Mar 12, 2026
  17. Junio C HamanoMar 12, 2026
  18. Jeff KingMar 14, 2026
  19. Junio C HamanoMar 14, 2026
  20. Junio C HamanoMar 16, 2026
  21. Jeff KingMar 16, 2026
  22. Junio C HamanoMar 16, 2026

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.