author | Johannes Sixt <j6t@kdbg.org> | |
Sun, 10 Jan 2010 13:11:22 +0000 (14:11 +0100) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Sun, 10 Jan 2010 18:15:03 +0000 (10:15 -0800) | ||
commit | 2b541bf8be2bbd6cc8daf8e3d5d4a8ee30b2ce4e | |
tree | a96beedf645609deb877c8b6180bae4df1fa658e | tree | snapshot |
parent | ab0b41daf62ec3076e980fcad492b1997b35f22b | commit | diff |
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 <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
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 <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Makefile | diff | blob | history | |
run-command.c | diff | blob | history | |
t/t0061-run-command.sh | [new file with mode: 0755] | blob |
test-run-command.c | [new file with mode: 0644] | blob |