Subject: Re: [PATCH 2/2][Perlers?] git-send-email: SIG{TERM,INT} handlers

From: Junio C Hamano <[email-masked]>
Date: Sat, 02 Feb 2008 13:31:32 -0800

Michael Witten <[email-masked]> 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?