From: John Keeping Date: Sat, 5 Sep 2015 13:12:49 +0000 (+0100) Subject: test-lib-functions: detect test_when_finished in subshell X-Git-Tag: v2.7.0-rc0~138^2 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/0968f12a99c4ac784b6b7f858003662cfaae117f?ds=sidebyside;hp=0968f12a99c4ac784b6b7f858003662cfaae117f test-lib-functions: detect test_when_finished in subshell test_when_finished does nothing in a subshell because the change to test_cleanup does not affect the parent. There is no POSIX way to detect that we are in a subshell ($$ and $PPID are specified to remain unchanged), but we can detect it on Bash and fall back to ignoring the bug on other shells. Signed-off-by: John Keeping Signed-off-by: Junio C Hamano ---