From: "Stephen R. van den Berg" <srb@cuci.nl>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org, Johannes Schindelin <Johannes.Schindelin@gmx.de>
Subject: Re: [PATCH 2/3] git-daemon: make the signal handler almost a no-op
Date: Thu, 14 Aug 2008 12:13:07 +0200 [thread overview]
Message-ID: <20080814101307.GG9680@cuci.nl> (raw)
In-Reply-To: <7vljz0dmtj.fsf@gitster.siamese.dyndns.org>
Junio C Hamano wrote:
>"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().
Then that is the fundamental difference in maintainability-views.
I find it more likely that we change the interface to setup the signal
handler (in a future OS or by changing the way you invoke it), than
that the actual work done by the signal handler is changed.
But since your view carries more weight here, I'll adapt the patch to
solution A.
>> Solution C is what follows your train of thought better, because it
>> future-proofs the setup as well as the handler.
>"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.
>From a portability standpoint using sigaction is worse than signal, and
rearming the handler even when it is not required is not a big deal.
--
Sincerely,
Stephen R. van den Berg.
"Hold still, while I inject you with SQL."
next prev parent reply other threads:[~2008-08-14 10:14 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-13 8:43 [PATCH 1/3] git-daemon: logging done right Stephen R. van den Berg
2008-08-13 8:43 ` [PATCH 3/3] git-daemon: rewrite kindergarden Stephen R. van den Berg
2008-08-13 8:58 ` Stephen R. van den Berg
2008-08-13 9:00 ` [PATCH] " Stephen R. van den Berg
2008-08-13 10:40 ` [PATCH] git-daemon: rewrite kindergarden, new option --max-connections Stephen R. van den Berg
2008-08-13 9:05 ` [PATCH 3/3] git-daemon: rewrite kindergarden Petr Baudis
2008-08-13 10:37 ` Stephen R. van den Berg
2008-08-13 8:43 ` [PATCH 2/3] git-daemon: make the signal handler almost a no-op Stephen R. van den Berg
2008-08-14 0:09 ` Junio C Hamano
2008-08-14 0:18 ` Stephen R. van den Berg
2008-08-14 1:09 ` Junio C Hamano
2008-08-14 7:47 ` Stephen R. van den Berg
2008-08-14 8:26 ` Junio C Hamano
2008-08-14 10:13 ` Stephen R. van den Berg [this message]
2008-08-14 13:41 ` Johannes Schindelin
2008-08-13 23:13 ` [PATCH 1/3] git-daemon: logging done right Junio C Hamano
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=20080814101307.GG9680@cuci.nl \
--to=srb@cuci.nl \
--cc=Johannes.Schindelin@gmx.de \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.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).