All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Noam Postavsky <npostavs@users.sourceforge.net>
Cc: git@vger.kernel.org
Subject: Re: git-credential-cache--daemon quits on SIGHUP, can we change it to ignore instead?
Date: Sun, 18 Oct 2015 10:58:39 -0700	[thread overview]
Message-ID: <xmqqfv18awj4.fsf@gitster.mtv.corp.google.com> (raw)
In-Reply-To: <CAM-tV-_eOgnhqsTFN6kKW=tcS7gAPYaxskBaxnJZo3bsx02HZg@mail.gmail.com> (Noam Postavsky's message of "Sun, 18 Oct 2015 11:15:59 -0400")

Noam Postavsky <npostavs@users.sourceforge.net> writes:

> On Sat, Oct 10, 2015 at 12:45 PM, Noam Postavsky
> <npostavs@users.sourceforge.net> 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?

  reply	other threads:[~2015-10-18 17:58 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-10 16:45 git-credential-cache--daemon quits on SIGHUP, can we change it to ignore instead? Noam Postavsky
2015-10-18 15:15 ` Noam Postavsky
2015-10-18 17:58   ` Junio C Hamano [this message]
2015-10-19  0:51     ` Noam Postavsky
2015-10-21  2:35     ` Noam Postavsky
2015-10-24 21:47       ` Noam Postavsky
2015-10-25 16:58         ` Junio C Hamano
2015-10-26 21:50           ` Jeff King
2015-10-27  0:50             ` Noam Postavsky
2015-10-27 18:41               ` Jeff King
2015-10-27 19:04                 ` Junio C Hamano
2015-10-27 17:52             ` Junio C Hamano
2015-10-27 18:47               ` Jeff King
2015-10-28  3:46                 ` Noam Postavsky
2015-10-30  0:10                   ` Jeff King
2015-10-30  0:43                     ` Noam Postavsky
2015-10-30  0:50                       ` Jeff King
2015-10-30  1:20                         ` Noam Postavsky
2015-10-30 21:08                           ` Jeff King
2015-11-09  2:58                             ` Noam Postavsky
2015-11-09 15:53                               ` Jeff King
2015-11-10  1:05                                 ` Noam Postavsky
2015-11-10 12:25                                   ` Jeff King
2015-11-10 12:26                                     ` Jeff King
2015-11-11  0:22                                       ` Noam Postavsky
2015-12-04 18:55                                     ` Junio C Hamano
2015-12-04 19:06                                       ` Jeff King
2015-12-04 20:05                                         ` Junio C Hamano
2015-12-04 23:25                                           ` Jeff King

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=xmqqfv18awj4.fsf@gitster.mtv.corp.google.com \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=npostavs@users.sourceforge.net \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.