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

Re: [PATCH 2/3] git-daemon: make the signal handler almost a no-op

From
Junio C Hamano <gitster@pobox.com>
Date
Aug 14, 2008, 08:26 UTC
Message-ID
<7vljz0dmtj.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<20080814074717.GC9680@cuci.nl>
"Stephen R. van den Berg" <srb@cuci.nl> writes:
> Solution A is what you propose, but which I find less appealing because
> any future magic to actually setup the handler needs to be maintained
> and updated in two places.

Well, A is attractive because it leaves the window open for us to later not rearming it unconditionally from child_handler(). I happen to think that the interface we will use to call "signal()" is much less likely to change than what we would do in child_handler().

> Solution C is what follows your train of thought better, because it
> future-proofs the setup as well as the handler.

Surely, we could take this route as the logical conclusion from my maintainability concerns, except that, if we are to make things as fine grained as you suggest, we would definitely will not have a single "setup", but "setup" and "rearm" as separate functions. Perhaps "setup" may start using sigaction() with SA_RESETHAND cleared, and we can make "rearm" truly a no-op everywhere.

 
Previous: Stephen R. van den BergNext: Stephen R. van den Berg
Message 13 of 16 in “git-daemon: logging done right”
  1. 1/3 git-daemon: logging done rightStephen R. van den Berg, Aug 13, 2008
  2. 3/3 git-daemon: rewrite kindergardenStephen R. van den Berg, Aug 13, 2008
  3. Stephen R. van den BergAug 13, 2008
  4. git-daemon: rewrite kindergardenStephen R. van den Berg, Aug 13, 2008
  5. git-daemon: rewrite kindergarden, new option --max-connectionsStephen R. van den Berg, Aug 13, 2008
  6. Petr BaudisAug 13, 2008
  7. Stephen R. van den BergAug 13, 2008
  8. 2/3 git-daemon: make the signal handler almost a no-opStephen R. van den Berg, Aug 13, 2008
  9. Junio C HamanoAug 14, 2008
  10. Stephen R. van den BergAug 14, 2008
  11. Junio C HamanoAug 14, 2008
  12. Stephen R. van den BergAug 14, 2008
  13. Junio C HamanoAug 14, 2008
  14. Stephen R. van den BergAug 14, 2008
  15. Johannes SchindelinAug 14, 2008
  16. Junio C HamanoAug 13, 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.