From: Junio C Hamano <gitster@pobox.com>
To: "Torsten Bögershausen" <tboegi@web.de>
Cc: ramsay@ramsay1.demon.co.uk, mlevedahl@gmail.com, git@vger.kernel.org
Subject: Re: [PATCH] CYGWIN: Use a TCP socket for pipe()
Date: Thu, 27 Jun 2013 10:38:47 -0700 [thread overview]
Message-ID: <7vvc4zsbbs.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <201306271831.13865.tboegi@web.de> ("Torsten Bögershausen"'s message of "Thu, 27 Jun 2013 18:31:13 +0200")
Torsten Bögershausen <tboegi@web.de> writes:
> Work around issues that git hangs when doing fetch or pull under
> various protocols under CYGWIN.
>
> Replace pipe() with a socket connection using a TCP/IP.
> Introduce a new function socket_pipe() in compat/socket_pipe.c
Sounds like sweeping the real problem, whatever it is, under rug.
Is it that we are assuming a pipe buffer that is sufficiently large
and expecting a write that we deem to be small enough not to block,
causing a deadlock on a platform with very small pipe buffer, or
something?
> + (void)setsockopt(fd_listen, SOL_SOCKET, SO_REUSEADDR,
> + (char*)&reuse_on, sizeof(reuse_on));
Broken indentation.
Either align (note: these are only to illustrate the column
alignment; I am not encouraging to indent with leading SPs) the
opening "(" of the "(char *)" cast with "f" in "fd_listen", like
this,
(void)setsockopt(fd_listen, SOL_SOCKET, SO_REUSEADDR,
(char *)&reuse_on, sizeof(reuse_on));
by a run of HT with minimum number of SP, or push the beginning of
the second line past opening "(" after "setsockopt", like this,
(void)setsockopt(fd_listen, SOL_SOCKET, SO_REUSEADDR,
(char *)&reuse_on, sizeof(reuse_on));
with a run of minimum number of HT without any SP.
> diff --git a/git-compat-util.h b/git-compat-util.h
> index c1f8a47..88632ab 100644
> --- a/git-compat-util.h
> +++ b/git-compat-util.h
> @@ -176,6 +176,10 @@ int get_st_mode_bits(const char *path, int *mode);
> #endif
> #endif
>
> +int socket_pipe(int filedes[2]);
> +#ifdef GIT_USE_SOCKET_PIPE
> +#define pipe(a) socket_pipe(a)
> +#endif
Shouldn't the function declaration be inside this #ifdef?
> /* used on Mac OS X */
> #ifdef PRECOMPOSE_UNICODE
> #include "compat/precompose_utf8.h"
next prev parent reply other threads:[~2013-06-27 17:39 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-27 16:31 [PATCH] CYGWIN: Use a TCP socket for pipe() Torsten Bögershausen
2013-06-27 17:38 ` Junio C Hamano [this message]
2013-06-28 2:46 ` Mark Levedahl
2013-06-30 19:47 ` Torsten Bögershausen
2013-06-30 22:56 ` Junio C Hamano
2013-07-02 14:57 ` Torsten Bögershausen
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=7vvc4zsbbs.fsf@alter.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=mlevedahl@gmail.com \
--cc=ramsay@ramsay1.demon.co.uk \
--cc=tboegi@web.de \
/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).