ebook-viewer refuses to die after ctrl+c
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
calibre |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Hi, Calibre developers.
I am writting a technical document in pandoc and seeing the epub result using calibre using the command line ebook-viewer. Thank you very much for that.
But when I compile with pandoc and later execute `ebook-viewer mybook.epub` after seeing the result I won't be able to interrupt the process from the command line which kills my workflow so much that I had to program this nasty script:
```perl
use v5.40.0;
use strict;
use warnings;
die 'You need to send a book' if !scalar @ARGV;
my $pid = fork;
if (!$pid) {
exec 'ebook-viewer', @ARGV;
}
$SIG{INT} = sub {
kill 'KILL', $pid;
$SIG{INT} = 'DEFAULT';
kill 'INT', $$;
};
waitpid $pid, 0;
```
I think you should give the chance to interrupt with ctrl+c not ignoring completely SIGINT.
Thank you very much again, Sergio.
This would be closed by this pull request https:/ /github. com/kovidgoyal/ calibre/ pull/2685