From owner-freebsd-bugs Tue Apr 9 8:30:13 2002 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 1A9A637B41A for ; Tue, 9 Apr 2002 08:30:03 -0700 (PDT) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id g39FU3n50318; Tue, 9 Apr 2002 08:30:03 -0700 (PDT) (envelope-from gnats) Received: from lelu.olari.bbnetworks.net (lelu.olari.bbnetworks.net [212.16.96.66]) by hub.freebsd.org (Postfix) with ESMTP id E566137B41A for ; Tue, 9 Apr 2002 08:25:21 -0700 (PDT) Received: (from root@localhost) by lelu.olari.bbnetworks.net (8.11.6/8.11.6) id g39FPwZ83311; Tue, 9 Apr 2002 18:25:58 +0300 (EEST) (envelope-from hsu) Message-Id: <200204091525.g39FPwZ83311@lelu.olari.bbnetworks.net> Date: Tue, 9 Apr 2002 18:25:58 +0300 (EEST) From: Heikki Suonsivu Reply-To: Heikki Suonsivu To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Subject: bin/36926: send-pr destroys PR if emacs interrupt character is used Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >Number: 36926 >Category: bin >Synopsis: send-pr destroys PR if emacs interrupt character is used >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Tue Apr 09 08:30:02 PDT 2002 >Closed-Date: >Last-Modified: >Originator: Heikki Suonsivu >Release: FreeBSD 4.4-STABLE i386 >Organization: bbnetworks.net >Environment: System: FreeBSD lelu.olari.bbnetworks.net 4.4-STABLE FreeBSD 4.4-STABLE #3: Thu Nov 29 07:07:25 EET 2001 hsu@lelu.olari.bbnetworks.net:/usr/obj/usr/src/sys/CAT i386 Console driver is pcvt. >Description: When editing a PR on console with emacs, send-pr seems to get a false signal and aborts. This has been around long, as I have seen this 3-4 years ago. It is very annoying because the PR is not saved anywhere and the situation is often quite heated. Every time this happens to me happens when standing in computer room, having a nightmarish session fixing something, and then writing a PR about whatever I run into, getting 'Aborted ...' and giving up. # 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 >How-To-Repeat: Go to console or unsetenv DISPLAY on xterm setenv EDITOR emacs send-pr press  in emacs (emacs interrupt character) exit from emacs normally and you get "Aborting ..." and your PR is lost. This is repeatable. >Fix: Workaround for the problem would be leaving unfinished PR, if edited, in the temporary file, so that a new send-pr can be invoked and unfinished or unsent PR can be included into it. I think send-pr should not get mad on whatever interrupts the editor gets, anyway, and destroying edited PR is usually undesirable, it should be saved somwhere like mail saves a dead.letter. dead.pr :-) ? Probably should be submitted to gnats people also, but maybe first figure out a proper fix. --- /usr/bin/send-pr Tue Mar 19 19:33:08 2002 +++ /tmp/send-pr-fixed Tue Apr 9 18:08:44 2002 @@ -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 ..."; if cmp -s $REF $TEMP; then rm -f $REF $TEMP; else rm -f $REF; echo "Unfinished PR left in $TEMP"; fi; 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: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message