author | Johannes Sixt <johannes.sixt@telecom.at> | |
Sat, 16 Feb 2008 17:36:38 +0000 (18:36 +0100) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Sat, 23 Feb 2008 19:59:44 +0000 (11:59 -0800) | ||
commit | e72ae28895b22052b7ca2eef36c039ac62671f7d | |
tree | 35e5df11a285b4467054fcec75cf8e35f38093e1 | tree | snapshot |
parent | 923d44aeb7cb6d21eeb459fdc1b58137e37c2b1c | commit | diff |
start_command(), .in/.out/.err = -1: Callers must close the file descriptor
By setting .in, .out, or .err members of struct child_process to -1, the
callers of start_command() can request that a pipe is allocated that talks
to the child process and one end is returned by replacing -1 with the
file descriptor.
Previously, a flag was set (for .in and .out, but not .err) to signal
finish_command() to close the pipe end that start_command() had handed out,
so it was optional for callers to close the pipe, and many already do so.
Now we make it mandatory to close the pipe.
Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
By setting .in, .out, or .err members of struct child_process to -1, the
callers of start_command() can request that a pipe is allocated that talks
to the child process and one end is returned by replacing -1 with the
file descriptor.
Previously, a flag was set (for .in and .out, but not .err) to signal
finish_command() to close the pipe end that start_command() had handed out,
so it was optional for callers to close the pipe, and many already do so.
Now we make it mandatory to close the pipe.
Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin-fetch-pack.c | diff | blob | history | |
builtin-send-pack.c | diff | blob | history | |
builtin-tag.c | diff | blob | history | |
builtin-verify-tag.c | diff | blob | history | |
bundle.c | diff | blob | history | |
receive-pack.c | diff | blob | history | |
run-command.c | diff | blob | history | |
run-command.h | diff | blob | history |