Re: git-credential-cache--daemon quits on SIGHUP, can we change it to ignore instead?

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

 



Noam Postavsky <npostavs@xxxxxxxxxxxxxxxxxxxxx> writes:

> On Sat, Oct 10, 2015 at 12:45 PM, Noam Postavsky
> <npostavs@xxxxxxxxxxxxxxxxxxxxx> wrote:
>> I noticed that git-credential-cache--daemon quits on SIGHUP. This
>> seems like surprising behaviour for a daemon. Would it be acceptable
>> to change it to ignore SIGHUP?
>
> ping?

Thanks for pinging.  I guess this either fell in the cracks while
people were busy discussing other topics, or nobody agreed with the
reasoning behind the change, or perhaps a bit of both.  In any case,
it is a prodent thing to ping on the thread after a week or so,
which is what you did.  Very much appreciated.

I cannot speak for the person who was primarily responsible for
designing this behaviour, but I happen to agree with the current
behaviour in the situation where it was designed to be used.  Upon
the first use in your session, the "daemon" is auto-spawned, you can
keep talking with that same instance during your session, and you do
not have to do anything special to shut it down when you log out.
Isn't that what happens here?

If this were "when you start the system you start this free-standing
daemon once, and it will stay around until it gets shut down. If you
are staying around in logged-in state is immaterial" kind of daemon,
I'd expect it, upon being killed with HUP, to do something useful,
like re-reading its configuration file, and continue, instead of
dying.

Perhaps you can tweak the system to get both, by making it continue
upon HUP by default, but teaching it an option not to (i.e. the
current behaviour).  Pass that option when spawn_daemon() in
credential-cache.c starts the daemon.  When using the daemon as a
free-standing one (against the way its documentation expects you
to---see "git help credential-cache--daemon"), you do not pass that
option and your "daemon" will ignore HUP.

Hmm?
--
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]