Re: git-remote-fd problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Sep 10, 2014 at 03:29:00PM +0200, Jiri Sevcik wrote:
> Hi!
> I have problem with using git-remote-fd function. I create two local
> pipes for communication for locally running process git pull. Then I
> start git-upload-pack on remote side (this process is started in
> different part of my code  and it works correctly). Communication runs
> successfully and when remote side finish, I want to close local pipes
> to finish local process. I call close function to all of these pipes,
> but unfortunatelly local process doesnt finish (in this moment
> transfered data aresaved in /.git/object/pack folder in .pack files)
> and hanging on. But if I kill child of this local process, downloaded
> files are unpacked and files are created sucessfully. I think this way
> is not so correct. Can someone help me and tell me what am I doing
> wrong? Thank You. Code is in an attachement (its part of big system).

The remote-fd expects the transport to pass half-closes. So you can't
close all at once.

Let there be pipes W and R and transport connection C.

- W-read should be closed after being passed to remote-fd.
- R-write should be closed after being passed to remote-fd.
- Upon receiving "no more data" from C, close W-write.
- Upon receiving EOF from R-read, close it and signal "no more data"
  to C.

If you have server end, the same applies, but with remote-fd replaced
by upload-pack/upload-archive/receive-pack.


-Ilari
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]