From 2b541bf8be2bbd6cc8daf8e3d5d4a8ee30b2ce4e Mon Sep 17 00:00:00 2001 From: Johannes Sixt Date: Sun, 10 Jan 2010 14:11:22 +0100 Subject: start_command: detect execvp failures early Previously, failures during execvp could be detected only by finish_command. However, in some situations it is beneficial for the parent process to know earlier that the child process will not run. The idea to use a pipe to signal failures to the parent process and the test case were lifted from patches by Ilari Liusvaara. Signed-off-by: Johannes Sixt Signed-off-by: Junio C Hamano --- t/t0061-run-command.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100755 t/t0061-run-command.sh (limited to 't') diff --git a/t/t0061-run-command.sh b/t/t0061-run-command.sh new file mode 100755 index 000000000..10b26e4d8 --- /dev/null +++ b/t/t0061-run-command.sh @@ -0,0 +1,14 @@ +#!/bin/sh +# +# Copyright (c) 2009 Ilari Liusvaara +# + +test_description='Test run command' + +. ./test-lib.sh + +test_expect_success 'start_command reports ENOENT' ' + test-run-command start-command-ENOENT ./does-not-exist +' + +test_done -- cgit v1.2.1