Re: [PATCH 2/4] Git.pm: Allow pipes to be closed prior to calling command_close_bidi_pipe
- From
Jeff King <peff@peff.net>
- Date
- Feb 6, 2013, 23:04 UTC
- Message-ID
- <20130206230406.GK27507@sigill.intra.peff.net>
- In-Reply-To
- <c0966644278b0addbef6a03289ef9c553addf573.1360183427.git.mina86@mina86.com>
On Wed, Feb 06, 2013 at 09:47:04PM +0100, Michal Nazarewicz wrote:
Show 14 quoted lines
> From: Michal Nazarewicz <mina86@mina86.com> > > The command_close_bidi_pipe() function will insist on closing both > input and output pipes returned by command_bidi_pipe(). With this > change it is possible to close one of the pipes in advance and > pass undef as an argument. > > This allows for something like: > > my ($pid, $in, $out, $ctx) = command_bidi_pipe(...); > print $out "write data"; > close $out; > # ... do stuff with $in > command_close_bidi_pipe($pid, $in, undef, $ctx);
Should this part go into the documentation for command_close_bidi_pipe in Git.pm?
-Peff