From: Junio C Hamano <junkio@cox.net>
To: Franck <vagabon.xyz@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH 3/3] Add sideband status report to git-archive protocol
Date: Tue, 12 Sep 2006 16:44:12 -0700 [thread overview]
Message-ID: <7vhczcejlf.fsf@assigned-by-dhcp.cox.net> (raw)
In-Reply-To: 45066CFD.5040202@innova-card.com
Franck Bui-Huu <vagabon.xyz@gmail.com> writes:
>> I was uncomfortable letting waitpid() there to wait forever.
>> When does poll() return? (1) we have data ready in which case
>> we process; (2) the child somehow closed the pipe but without
>> dying, which is an error in the child. In the latter case even
>> not hanging in waitpid() and retrying the poll would not give
>> any useful input so that would not help either.
>
> your case (2) is not totaly right. If you look a the trace above,
> for the normal case, you can see that the child close the pipe then
> _after_ a while die. So there's a time when the child is not died
> but the pipe is closed.
>
> I think it's safe to assume that if the child closes the pipe, either
> because it has finished to write or something wrong going on, then
> it's going to die pretty soon.
I am essentially saying the same thing (and perhaps one more).
Something is wrong with the child, and either it's going to die
pretty soon in which case waitpid() to wait forever is fine, or
even if it is not going to die soon, going back to poll() would
not give us any useful information anyway, so WNOHANG was
pointless.
So we are in agreement.
> I think calling send_sideband() with sz = 0 should be fine,
I just coded it defensively -- no point calling send() when you
already know there is nothing to be sent.
next prev parent reply other threads:[~2006-09-12 23:43 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-09-10 7:09 [PATCH 1/2] archive: allow remote to have more formats than we understand Junio C Hamano
2006-09-10 7:12 ` [PATCH 2/2] Add --verbose to git-archive Junio C Hamano
2006-09-10 10:36 ` [PATCH 1/3] Move sideband client side support into reusable form Junio C Hamano
2006-09-10 19:15 ` Franck Bui-Huu
2006-09-10 10:37 ` [PATCH] Move sideband server " Junio C Hamano
2006-09-10 10:47 ` [PATCH 3/3] Add sideband status report to git-archive protocol Junio C Hamano
2006-09-10 15:58 ` [PATCH] git-upload-archive: add config option to allow only specified formats Rene Scharfe
2006-09-10 16:12 ` Rene Scharfe
2006-09-10 18:00 ` Junio C Hamano
2006-09-11 21:41 ` Rene Scharfe
2006-09-11 21:50 ` Jakub Narebski
2006-09-10 19:07 ` Franck Bui-Huu
2006-09-11 21:55 ` Rene Scharfe
2006-09-10 19:15 ` [PATCH 3/3] Add sideband status report to git-archive protocol Franck Bui-Huu
2006-09-10 20:31 ` Junio C Hamano
2006-09-11 10:34 ` Franck Bui-Huu
2006-09-12 7:24 ` Junio C Hamano
2006-09-12 8:17 ` Franck Bui-Huu
2006-09-12 8:45 ` Franck Bui-Huu
2006-09-12 9:00 ` [PATCH] connect.c: finish_connect(): allow null pid parameter Franck Bui-Huu
2006-09-13 4:48 ` Junio C Hamano
2006-09-13 8:26 ` [PATCH] Test return value of finish_connect() Franck Bui-Huu
2006-09-13 8:32 ` [PATCH] git_connect: change return type to pid_t Franck Bui-Huu
2006-09-12 23:44 ` Junio C Hamano [this message]
2006-09-10 12:05 ` [PATCH 1/2] archive: allow remote to have more formats than we understand Rene Scharfe
2006-09-10 19:02 ` Franck Bui-Huu
2006-09-10 19:07 ` Junio C Hamano
2006-09-10 19:18 ` Franck Bui-Huu
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7vhczcejlf.fsf@assigned-by-dhcp.cox.net \
--to=junkio@cox.net \
--cc=git@vger.kernel.org \
--cc=vagabon.xyz@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.
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 NNTP newsgroup(s).