Re: [PATCH v2] Clear fd after closing to avoid double-close error

2013-10-23 Thread Duy Nguyen
On Tue, Oct 22, 2013 at 8:36 PM, Jens Lindström wrote: > From: Jens Lindstrom > > In send_pack(), clear the fd passed to pack_objects() by setting > it to -1, since pack_objects() closes the fd (via a call to > run_command()). Likewise, in get_pack(), clear the fd passed to > run_command(). > >

Re: [PATCH v2] Clear fd after closing to avoid double-close error

2013-10-22 Thread Jeff King
On Tue, Oct 22, 2013 at 03:36:02PM +0200, Jens Lindström wrote: > In send_pack(), clear the fd passed to pack_objects() by setting > it to -1, since pack_objects() closes the fd (via a call to > run_command()). Likewise, in get_pack(), clear the fd passed to > run_command(). > > Not doing so ris

[PATCH v2] Clear fd after closing to avoid double-close error

2013-10-22 Thread Jens Lindström
From: Jens Lindstrom In send_pack(), clear the fd passed to pack_objects() by setting it to -1, since pack_objects() closes the fd (via a call to run_command()). Likewise, in get_pack(), clear the fd passed to run_command(). Not doing so risks having git_transport_push(), caller of send_pack(),