Skip to content

Commit a92f243

Browse files
bk2204gitster
authored andcommitted
t5564: fix test hang under zsh's sh mode
This test starts a SOCKS server in Perl in the background and then kills it after the tests are done. However, when using zsh (in sh mode) in the tests, the start_socks function hangs until the background process is killed. Note that this does not reproduce in a simple shell script, so there is likely some interaction between job handling, our heavy use of eval in the test framework, and possibly other complexities of our test framework. What is clear, however, is that switching from a compound statement to a subshell fixes the problem entirely and the test passes with no problem, so do that. Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent bf25fca commit a92f243

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

t/t5564-http-proxy.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,10 @@ test_expect_success 'clone can prompt for proxy password' '
4040

4141
start_socks() {
4242
mkfifo socks_output &&
43-
{
43+
(
4444
"$PERL_PATH" "$TEST_DIRECTORY/socks4-proxy.pl" "$1" >socks_output &
4545
echo $! > "$TRASH_DIRECTORY/socks.pid"
46-
} &&
46+
) &&
4747
read line <socks_output &&
4848
test "$line" = ready
4949
}

0 commit comments

Comments
 (0)