summaryrefslogtreecommitdiff
path: root/t/t0061-run-command.sh
diff options
context:
space:
mode:
authorJohannes Schindelin <johannes.schindelin@gmx.de>2019-11-22 14:41:02 +0000
committerJunio C Hamano <gitster@pobox.com>2019-11-23 11:17:01 +0900
commiteea4a7f4b3620df1b0bd3c1eb1d27e6fd4cb2ff5 (patch)
tree85e86a74f553f519877a0bd1565007fc344a3812 /t/t0061-run-command.sh
parentd9f6f3b6195a0ca35642561e530798ad1469bd41 (diff)
downloadgit-eea4a7f4b3620df1b0bd3c1eb1d27e6fd4cb2ff5.tar.gz
mingw: demonstrate that all file handles are inherited by child processes
When spawning child processes, we really should be careful which file handles we let them inherit. This is doubly important on Windows, where we cannot rename, delete, or modify files if there is still a file handle open. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t0061-run-command.sh')
-rwxr-xr-xt/t0061-run-command.sh4
1 files changed, 4 insertions, 0 deletions
diff --git a/t/t0061-run-command.sh b/t/t0061-run-command.sh
index 17c9c0f3bb..473a3405ef 100755
--- a/t/t0061-run-command.sh
+++ b/t/t0061-run-command.sh
@@ -12,6 +12,10 @@ cat >hello-script <<-EOF
cat hello-script
EOF
+test_expect_failure MINGW 'subprocess inherits only std handles' '
+ test-tool run-command inherited-handle
+'
+
test_expect_success 'start_command reports ENOENT (slash)' '
test-tool run-command start-command-ENOENT ./does-not-exist 2>err &&
test_i18ngrep "\./does-not-exist" err