From: Clemens Buchacher <drizzd@aon.at>
To: Junio C Hamano <junio@pobox.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] http-push: remove remote locks on exit signals
Date: Sat, 24 May 2008 00:17:23 +0200 [thread overview]
Message-ID: <20080523221723.GA4366@localhost> (raw)
In-Reply-To: <7vod6wr95y.fsf@gitster.siamese.dyndns.org>
Hi,
On Fri, May 23, 2008 at 02:40:41PM -0700, Junio C Hamano wrote:
> Clemens Buchacher <drizzd@aon.at> writes:
> > +static void remove_locks_on_signal(int signo)
> > +{
> > + remove_locks();
> > + signal(SIGINT, SIG_DFL);
> > + raise(signo);
> > +}
> > +
>
> If you caught signo, shouldn't you be resetting that signo not SIGINT?
True. I suppose we should fix that in remove_lock_file_on_signal() as well,
then? It does exactly the same thing.
> > static void remote_ls(const char *path, int flags,
> > void (*userFunc)(struct remote_ls_ctx *ls),
> > void *userData);
> > @@ -2255,6 +2273,8 @@ int main(int argc, char **argv)
> > goto cleanup;
> > }
> >
> > + signal(SIGINT, remove_locks_on_signal);
> > +
>
> and you may care more than just INT but perhaps HUP and others?
SIGINT was bothering me the most, because I often kill http-push by pressing
Ctrl+C. I also considered adding SIGQUIT, but decided against it because
normally I press Ctrl+\ only if I want the program to quit _right now_ and
Ctrl+C does not work. On the other hand, sending the signal twice will
terminate http-push either way.
I don't know in which situation SIGHUP would come into play.
Regards,
Clemens
next prev parent reply other threads:[~2008-05-23 22:23 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-22 19:55 [PATCH] http-push: remove remote locks on exit signals Clemens Buchacher
2008-05-23 21:40 ` Junio C Hamano
2008-05-23 22:17 ` Clemens Buchacher [this message]
2008-05-25 18:26 ` [PATCH] Reset the signal being handled Clemens Buchacher
2008-05-26 9:34 ` Johannes Schindelin
2008-05-26 19:35 ` [PATCH] lockfile: reset the correct signal Clemens Buchacher
2008-05-26 21:36 ` Johannes Schindelin
2008-05-27 7:49 ` Clemens Buchacher
2008-05-25 18:27 ` [PATCH] http-push: remove remote locks on exit signals Clemens Buchacher
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=20080523221723.GA4366@localhost \
--to=drizzd@aon.at \
--cc=git@vger.kernel.org \
--cc=junio@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).