git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Ilari Liusvaara <ilari.liusvaara@elisanet.fi>
To: Jiri Sevcik <jsevcik14@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: git-remote-fd problem
Date: Wed, 10 Sep 2014 17:47:57 +0300	[thread overview]
Message-ID: <20140910144756.GA4267@LK-Perkele-VII> (raw)
In-Reply-To: <CAOP4-939uAP2Tgofz01F40_Eb0F8GxBsU49HxNvAiyBCW6H08w@mail.gmail.com>

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

  reply	other threads:[~2014-09-10 14:54 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-10 13:29 git-remote-fd problem Jiri Sevcik
2014-09-10 14:47 ` Ilari Liusvaara [this message]
     [not found]   ` <CAOP4-92U+oFJJw38LWNmTqPtKMT=MDq0Ay9FiaGV5je77aUNpg@mail.gmail.com>
2014-12-29  9:47     ` Fwd: " Jiri Sevcik
2014-12-29 19:36       ` Ilari Liusvaara

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140910144756.GA4267@LK-Perkele-VII \
    --to=ilari.liusvaara@elisanet.fi \
    --cc=git@vger.kernel.org \
    --cc=jsevcik14@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).