git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v2] git daemon: avoid waking up too often

From
Avery Pennarun <apenwarr@gmail.com>
Date
Jul 23, 2008, 19:26 UTC
Message-ID
<32541b130807231226m73fcc874ub72f69adeb5d26c3@mail.gmail.com>
In-Reply-To
<4886D503.7030106@viscovery.net>
On 7/23/08, Johannes Sixt <j.sixt@viscovery.net> wrote:
> This makes porting this beast to Windows practically impossible because we
>  cannot have a poll() implementation that waits both on a listening socket
>  and a pipe. :-(
I have worked around such problems in the past by having a thread
whose job it is to read from the pipe and simply write it to a socket.
 The trick works for "console" objects, too, which in win32 are even
less agreeable than pipes.
(In case your life wasn't disgusting enough already today :))

Alternatively, you could use something like socketpair() instead of a pipe for this purpose. Naturally, Win32 helps you out here by somehow forgetting to include socketpair() in winsock, although it's sort of easy to emulate.

Have fun,
Avery
Previous: Johannes SchindelinNext: Johannes Schindelin
Message 5 of 6 in “git daemon: avoid waking up too often”
  1. git daemon: avoid waking up too oftenJohannes Schindelin, Jul 22, 2008
  2. git daemon: avoid waking up too oftenJohannes Schindelin, Jul 22, 2008
  3. Johannes SixtJul 23, 2008
  4. Johannes SchindelinJul 23, 2008
  5. Avery PennarunJul 23, 2008
  6. Johannes SchindelinJul 23, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.