From hsu@evoluutio.bbnetworks.net  Tue Nov 11 19:20:27 2003
Return-Path: <hsu@evoluutio.bbnetworks.net>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 1BD0516A4CE
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 11 Nov 2003 19:20:27 -0800 (PST)
Received: from evoluutio.bbnetworks.net (dyn071-235.ietf58.ietf.org [130.129.71.235])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 1F1C443FD7
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 11 Nov 2003 19:20:25 -0800 (PST)
	(envelope-from hsu@evoluutio.bbnetworks.net)
Received: from evoluutio.bbnetworks.net (localhost [127.0.0.1])
	by evoluutio.bbnetworks.net (8.12.10/8.12.10) with ESMTP id hAC3KN6K000445
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 11 Nov 2003 21:20:24 -0600 (CST)
	(envelope-from hsu@evoluutio.bbnetworks.net)
Received: (from root@localhost)
	by evoluutio.bbnetworks.net (8.12.10/8.12.10/Submit) id hAC6ULKV000891;
	Wed, 12 Nov 2003 00:30:21 -0600 (CST)
	(envelope-from hsu)
Message-Id: <200311120630.hAC6ULKV000891@evoluutio.bbnetworks.net>
Date: Wed, 12 Nov 2003 00:30:21 -0600 (CST)
From: Heikki Suonsivu <hsu@evoluutio.bbnetworks.net>
Reply-To: Heikki Suonsivu <hsu@evoluutio.bbnetworks.net>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: send-pr crashes if intr was used in editor
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         59201
>Category:       bin
>Synopsis:       send-pr crashes if intr was used in editor
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    ceri
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Nov 11 19:30:18 PST 2003
>Closed-Date:    Mon Dec 01 11:13:27 PST 2003
>Last-Modified:  Mon Dec 01 11:13:27 PST 2003
>Originator:     Heikki Suonsivu
>Release:        FreeBSD 5.1-CURRENT i386
>Organization:
bbnetworks.net
>Environment:
System: FreeBSD evoluutio.bbnetworks.net 5.1-CURRENT FreeBSD 5.1-CURRENT #0: Tue Nov 11 14:38:21 CST 2003 hsu@evoluutio.bbnetworks.net:/usr/obj/usr/src/sys/GENERIC i386

	This problem is probably the longest ever bug which has
remained unfixed, as I remember ripping my hair off in nightly
computer room due to this some time in 1996.  After send-pr ate my pr
about this, I gave up.

>Description:

For some reason, send-pr seems to get all interrupts from the editor
it uses to edit the PR.  Logically, it assumes that you stopped
editing your PR violently, and removes your PR, not sending or saving
it anywhere.  This happens even if the editor in question does not
stop on the interrupt character or uses it for its own purposes, like
Emacs.

>How-To-Repeat:

Log in on console

setenv EDITOR emacs

send-pr

When in emacs, use interrupt character, ctrl-G.

Type a lenghty and detailed bug report (don't save it anywhere else)

Exit emacs normally

and you get

send-pr: Aborting ...

And your PR is gone.

>Fix:

This at least leaves your PR around:

--- send-pr.orig	Tue Nov 11 13:08:41 2003
+++ send-pr	Wed Nov 12 00:18:17 2003
@@ -262,7 +262,7 @@
 # Catch some signals. ($xs kludge needed by Sun /bin/sh)
 xs=0
 trap 'rm -f $REF $TEMP; exit $xs' 0
-trap 'echo "$COMMAND: Aborting ..."; rm -f $REF $TEMP; xs=1; exit' 1 2 3 13 15
+trap 'echo "$COMMAND: Aborting ... saving unfinished PR into /tmp/pr.$$"; rm -f $REF ; mv $TEMP /tmp/pr.$$; xs=1; exit' 1 2 3 13 15
 
 # If they told us to use a specific file, then do so.
 if [ -n "$IN_FILE" ]; then




>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->bugmeister 
Responsible-Changed-By: ceri 
Responsible-Changed-When: Wed Nov 12 03:38:09 PST 2003 
Responsible-Changed-Why:  
Grab this one for the bugmeister. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=59201 
State-Changed-From-To: open->patched 
State-Changed-By: ceri 
State-Changed-When: Wed Nov 12 15:08:36 PST 2003 
State-Changed-Why:  
I committed the fix in revision 1.35 of src/gnu/usr.bin/send-pr/send-pr.sh. 
Thanks for submitting this. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=59201 
Responsible-Changed-From-To: bugmeister->ceri 
Responsible-Changed-By: ceri 
Responsible-Changed-When: Wed Nov 12 15:09:37 PST 2003 
Responsible-Changed-Why:  
My MFC reminder. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=59201 
State-Changed-From-To: patched->closed 
State-Changed-By: ceri 
State-Changed-When: Mon Dec 1 11:13:03 PST 2003 
State-Changed-Why:  
This was MFC'd in r1.13.2.13.  Thanks again. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=59201 
>Unformatted:
