Skip to content

forking and threading

Brandon Williams git 6 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v6 Latest11 patches 15 repliesIn review
  2. v511 patches 14 repliesSuperseded
  3. v410 patches 2 repliesSuperseded
Earlier versions · 3
VersionPostedPatchesRepliesStatus
v310 patches6 repliesSuperseded
v26 patches15 repliesSuperseded
v15 patches15 repliesSuperseded

Changes in v6 from the cover letter

* fix some windows compat issues
* better comment on the string_list_remove function (also marked extern)

Patches in v6 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/11t5550: use write_script to generate post-update hookt/t5550-http-fetch-dumb.sh+3 -20 replies
2/11t0061: run_command executes scripts without a #! linet/t0061-run-command.sh+11 -02 replies
3/11run-command: prepare command before forkingrun-command.c+26 -200 replies
4/11run-command: use the async-signal-safe execv instead of execvprun-command.c+29 -15 replies
5/11string-list: add string_list_remove functionstring-list.c string-list.h+25 -00 replies
6/11run-command: prepare child environment before forkingrun-command.c+56 -100 replies
7/11run-command: don't die in child when duping /dev/nullrun-command.c+13 -150 replies
8/11run-command: eliminate calls to error handling functions in childrun-command.c+89 -320 replies
9/11run-command: handle dup2 and close errors in childrun-command.c+42 -160 replies
10/11run-command: add note about forking and threadingrun-command.c+9 -00 replies
11/11run-command: block signals between fork and execverun-command.c+68 -00 replies

Reviews trailers per patch

None of the 11 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchEric WongJonathan Nieder
SeriesR-b R-b R-b R-b
1/11
2/11
3/11
4/11
5/11
6/11
7/11
8/11Helped-by
9/11
10/11
11/11

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v6 thread

Cover letter [PATCH v6 00/11] forking and threading

Changes in v6:
* fix some windows compat issues
* better comment on the string_list_remove function (also marked extern)

Brandon Williams (10):
t5550: use write_script to generate post-update hook
t0061: run_command executes scripts without a #! line
run-command: prepare command before forking
run-command: use the async-signal-safe execv instead of execvp
string-list: add string_list_remove function
run-command: prepare child environment before forking
run-command: don't die in child when duping /dev/null
run-command: eliminate calls to error handling functions in child
run-command: handle dup2 and close errors in child
run-command: add note about forking and threading

Eric Wong (1):
run-command: block signals between fork and execve

 run-command.c              | 404 +++++++++++++++++++++++++++++++++++----------
 string-list.c              |  18 ++
 string-list.h              |   7 +
 t/t0061-run-command.sh     |  11 ++
 t/t5550-http-fetch-dumb.sh |   5 +-
 5 files changed, 360 insertions(+), 85 deletions(-)

--- interdiff with 'origin/bw/forking-and-threading'

run-command.c +1 -1
index 1f3c38e43..a97d7bf9f 100644
@@ -402,7 +402,6 @@ static char **prep_childenv(const char *const *deltaenv)
 	strbuf_release(&key);
 	return childenv;
 }
-#endif
 
 struct atfork_state {
 #ifndef NO_PTHREADS
@@ -450,6 +449,7 @@ static void atfork_parent(struct atfork_state *as)
 		"restoring signal mask");
 #endif
 }
+#endif /* GIT_WINDOWS_NATIVE */
 
 static inline void set_cloexec(int fd)
 {
string-list.h +3 -1
index 18520dbc8..29bfb7ae4 100644
@@ -64,8 +64,10 @@ struct string_list_item *string_list_insert(struct string_list *list, const char
 
 /*
  * Removes the given string from the sorted list.
+ * If the string doesn't exist, the list is not altered.
  */
-void string_list_remove(struct string_list *list, const char *string, int free_util);
+extern void string_list_remove(struct string_list *list, const char *string,
+			       int free_util);
 
 /*
  * Checks if the given string is part of a sorted list. If it is part of the list,
t/t0061-run-command.sh +1 -1
index 1a7490e29..98c09dd98 100755
@@ -26,7 +26,7 @@ test_expect_success 'run_command can run a command' '
 	test_cmp empty err
 '
 
-test_expect_success 'run_command can run a script without a #! line' '
+test_expect_success !MINGW 'run_command can run a script without a #! line' '
 	cat >hello <<-\EOF &&
 	cat hello-script
 	EOF
Signature · 1 line
2.12.2.816.g2cccc81164-goog