git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Michael Witten <mfwitten@MIT.EDU>
Cc: git@vger.kernel.org
Subject: Re: [PATCH 2/2][Perlers?] git-send-email: SIG{TERM,INT} handlers
Date: Sat, 02 Feb 2008 13:31:32 -0800	[thread overview]
Message-ID: <7vprvf11vv.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: 1201925161-9864-2-git-send-email-mfwitten@mit.edu

Michael Witten <mfwitten@MIT.EDU> writes:

> +# Handle Uncouth Termination
> +sub signal_handler{
> +	
> +	# Make text normal
> +	print color("reset"), "\n";
> +
> +	# SMTP password masked
> +	system "stty echo";
> +
> +	# tmp files from --compose
> +	if (-e $compose_filename) {
> +		print "'$compose_filename' contains an intermediate version of the email you were composing.\n";
> +	}
> +	if (-e ($compose_filename . ".final")) {
> +		print "'$compose_filename.final' contains the composed email.\n"
> +	}
> +
> +	exit;
> +};
> +
> +$SIG{TERM} = \&signal_handler;
> +$SIG{INT}  = \&signal_handler;
> +
>  # Begin by accumulating all the variables (defined above), that we will end up
>  # needing, first, from the command line:

Now I think this patch (except the part about "stty echo") makes
sense, although I did not try killing a send-email session with
signals myself.

Success stories, people?

  reply	other threads:[~2008-02-02 21:32 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-01  4:59 [PATCH] git-send-email: ssh/login style password requests Michael Witten
2008-02-01 10:09 ` Junio C Hamano
2008-02-01 18:38   ` Michael Witten
2008-02-01 22:42     ` Michael Witten
2008-02-01 23:34       ` Junio C Hamano
2008-02-01 23:42         ` Michael Witten
2008-02-02  1:27           ` Junio C Hamano
2008-02-02  4:06             ` [PATCH 1/2][Perlers?] " Michael Witten
2008-02-02  4:06               ` [PATCH 2/2][Perlers?] git-send-email: SIG{TERM,INT} handlers Michael Witten
2008-02-02 21:31                 ` Junio C Hamano [this message]
2008-02-02 21:31               ` [PATCH 1/2][Perlers?] git-send-email: ssh/login style password requests Junio C Hamano
2008-02-03 17:59                 ` Michael Witten
2008-02-03 20:59                   ` Michael Witten
2008-02-04  0:53                     ` [PATCH 1/3][V.2] " Michael Witten
2008-02-04  0:53                       ` [PATCH 2/3][V.2] git-send-email: SIG{TERM,INT} handlers Michael Witten
2008-02-04  0:53                         ` [PATCH 3/3][V.2] git-send-email: Better handling of EOF [^D] Michael Witten

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=7vprvf11vv.fsf@gitster.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=mfwitten@MIT.EDU \
    /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).