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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Junio C Hamano wrote:
>"Stephen R. van den Berg" <srb@xxxxxxx> 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."
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux