Bug#778648: devscripts: hitting ctrl-c while an editor is open should terminate bts, but instead it goes ahead

2015-02-17 Thread James McCoy
On Tue, Feb 17, 2015 at 04:29:29PM -0500, Daniel Kahn Gillmor wrote:
 it looks like if you send emacs a SIGINT, it will clean up nicely and
 terminate with a return code of 0.

That seems like suboptimal behavior.  Exiting due to a signal doesn't
seem like a successful exit.

It seems emacs isn't very consistent about this.  Running emacsclient to
connect to an existing daemon means that frame exits with an exit code
of 130, as expected.  Running a standalone “emacs -nw”, SIGINT gets
caught and doesn't exit.  Running a standalone X emacs frame does exit
cleanly as you describe.

 if i run a bts command that drops me into my editor in an X11
 environment, emacs spawns as a separate window, while my shell is
 blocked by the bts invocation (as it should be).
 
 if i hit ctrl-C in the shell, though, apparently bts passes the SIGINT
 through to my editor, and then proceeds to use the contents of the
 message as prepared.

Yes, Perl ignores SIGINT/SIGQUIT while running the external process, so
that process gets the signal.  I'll adjust bts to inspect the exit code
of the process so it doesn't treat a non-zero exit code as success.
However, emacs will need to be fixed to not exit with a zero when
killed.

As an alternative, you can tell bts to cancel by saving an empty file.

Cheers,
-- 
James
GPG Key: 4096R/331BA3DB 2011-12-05 James McCoy james...@debian.org


signature.asc
Description: Digital signature


Bug#778648: devscripts: hitting ctrl-c while an editor is open should terminate bts, but instead it goes ahead

2015-02-17 Thread Daniel Kahn Gillmor
Package: devscripts
Version: 2.15.1
Severity: normal

emacs is my default editor.

it looks like if you send emacs a SIGINT, it will clean up nicely and
terminate with a return code of 0.

if i run a bts command that drops me into my editor in an X11
environment, emacs spawns as a separate window, while my shell is
blocked by the bts invocation (as it should be).

if i hit ctrl-C in the shell, though, apparently bts passes the SIGINT
through to my editor, and then proceeds to use the contents of the
message as prepared.

I expected ctrl-C to terminate the bts report rather than sending it
in.

here's me starting to close #770592 by mistake, realizing that wasn't
correct and trying to abort it:

0 dkg@alice:~$ bts done 770592 2.1.1-1
^C0 dkg@alice:~$

(the leading 0 in my prompt is the return code of the previous
command)

unfortunately, this actually did close #770592, which i didn't intend.

   --dkg

-- Package-specific info:

--- /etc/devscripts.conf ---

--- ~/.devscripts ---
Not present

-- System Information:
Debian Release: 8.0
  APT prefers testing
  APT policy: (500, 'testing'), (200, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.16.0-4-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages devscripts depends on:
ii  dpkg-dev 1.17.23
ii  libc62.19-13
ii  perl 5.20.1-5
ii  python3  3.4.2-2
pn  python3:any  none

Versions of packages devscripts recommends:
ii  at  3.1.16-1
ii  curl7.38.0-4
ii  dctrl-tools 2.23
ii  debian-keyring  2014.12.10
ii  dput-ng [dput]  1.8
ii  dupload 2.7.0
pn  equivs  none
ii  fakeroot1.20.2-1
ii  file1:5.20-2
ii  gnupg   1.4.18-6
ii  libdistro-info-perl 0.14
ii  libencode-locale-perl   1.03-1
ii  libjson-perl2.61-1
ii  liblwp-protocol-https-perl  6.06-2
ii  libparse-debcontrol-perl2.005-4
pn  libsoap-lite-perl   none
ii  liburi-perl 1.64-1
ii  libwww-perl 6.08-1
ii  lintian 2.5.30+deb8u3
ii  man-db  2.7.0.2-5
ii  patch   2.7.1-6
ii  patchutils  0.3.3-1
ii  python3-debian  0.1.25
pn  python3-magic   none
ii  sensible-utils  0.0.9
ii  strace  4.9-2
ii  unzip   6.0-16
ii  wdiff   1.2.2-1
ii  wget1.16-1
ii  xz-utils5.1.1alpha+20120614-2+b3

Versions of packages devscripts suggests:
ii  build-essential  11.7
pn  cvs-buildpackage none
pn  debbindiff   none
ii  devscripts-el35.12
pn  gnuplot  none
ii  gpgv 1.4.18-6
ii  heirloom-mailx [mailx]   12.5-4
pn  libauthen-sasl-perl  none
pn  libfile-desktopentry-perlnone
ii  libnet-smtp-ssl-perl 1.01-3
pn  libterm-size-perlnone
ii  libtimedate-perl 2.3000-2
pn  libyaml-syck-perlnone
ii  mailutils [mailx]1:2.99.98-2
pn  mutt none
ii  openssh-client [ssh-client]  1:6.7p1-3
ii  svn-buildpackage 0.8.5+nmu1
ii  w3m  0.5.3-19

-- debconf-show failed


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org