Comment 0 for bug 2099777

Revision history for this message
Sergio (sergiotarxz) wrote :

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 to 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.