Bug#778648: devscripts: hitting ctrl-c while an editor is open should terminate bts, but instead it goes ahead
James McCoy
jamessan at debian.org
Wed Feb 18 01:03:30 UTC 2015
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 <jamessan at debian.org>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 949 bytes
Desc: Digital signature
URL: <http://lists.alioth.debian.org/pipermail/devscripts-devel/attachments/20150217/22d72399/attachment.sig>
More information about the devscripts-devel
mailing list