run-command: support custom fd-set in async
commitae6a5609c025d9ac79e54a3a052704e25d885314
authorErik Faye-Lund <kusmabite@gmail.com>
Fri, 5 Feb 2010 20:57:38 +0000 (5 12:57 -0800)
committerJunio C Hamano <gitster@pobox.com>
Sat, 6 Feb 2010 04:57:22 +0000 (5 20:57 -0800)
treec74d50beebc5c7bfe2f5ca9e335c45c534243af7
parent4f41b611481bad08319966f7787fc7c4c7bfaa52
run-command: support custom fd-set in async

This patch adds the possibility to supply a set of non-0 file
descriptors for async process communication instead of the
default-created pipe.

Additionally, we now support bi-directional communiction with the
async procedure, by giving the async function both read and write
file descriptors.

To retain compatiblity and similar "API feel" with start_command,
we require start_async callers to set .out = -1 to get a readable
file descriptor.  If either of .in or .out is 0, we supply no file
descriptor to the async process.

[sp: Note: Erik started this patch, and a huge bulk of it is
     his work.  All bugs were introduced later by Shawn.]

Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/technical/api-run-command.txt
builtin-fetch-pack.c
convert.c
remote-curl.c
run-command.c
run-command.h
upload-pack.c