"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "lib/Gscan2pdf/Frontend/CLI.pm" between
gscan2pdf-2.13.1.tar.xz and gscan2pdf-2.13.2.tar.xz

About: gscan2pdf is a GUI to produce PDFs from scanned documents (using Perl).

CLI.pm  (gscan2pdf-2.13.1.tar.xz):CLI.pm  (gscan2pdf-2.13.2.tar.xz)
package Gscan2pdf::Frontend::CLI; package Gscan2pdf::Frontend::CLI;
use strict; use strict;
use warnings; use warnings;
use feature 'switch'; use feature 'switch';
no if $] >= 5.018, warnings => 'experimental::smartmatch'; no if $] >= 5.018, warnings => 'experimental::smartmatch';
use Locale::gettext 1.05; # For translations use Locale::gettext 1.05; # For translations
use Carp; use Carp;
use Text::ParseWords; use Text::ParseWords;
use Glib qw(TRUE FALSE); use Glib qw(TRUE FALSE);
use POSIX qw(locale_h :signal_h :errno_h :sys_wait_h); use POSIX qw(locale_h :signal_h :errno_h :sys_wait_h);
use Proc::Killfam; use Proc::Killfam;
use IPC::Open3; use IPC::Open3;
use IO::Handle; use IO::Handle;
use Gscan2pdf::NetPBM; use Gscan2pdf::NetPBM;
use Gscan2pdf::Scanner::Options; use Gscan2pdf::Scanner::Options;
use Gscan2pdf::Translation '__'; # easier to extract strings with xgettext use Gscan2pdf::Translation '__'; # easier to extract strings with xgettext
use Image::Sane ':all'; # To get SANE_NAME_PAGE_WIDTH & SANE_NAME_PAGE_HEIGHT use Image::Sane ':all'; # To get SANE_NAME_PAGE_WIDTH & SANE_NAME_PAGE_HEIGHT
use Cwd; use Cwd;
use File::Spec; use File::Spec;
use Readonly; use Readonly;
use version; use version;
Readonly my $_POLL_INTERVAL => 100; # ms Readonly my $_POLL_INTERVAL => 100; # ms
Readonly my $_100 => 100; Readonly my $_100 => 100;
Readonly my $_1KB => 1024; Readonly my $_1KB => 1024;
Readonly my $ALL_PENDING_ZOMBIE_PROCESSES => -1; Readonly my $ALL_PENDING_ZOMBIE_PROCESSES => -1;
Readonly my $INFINITE_DOCUMENTS => -1; Readonly my $INFINITE_DOCUMENTS => -1;
our $VERSION = '2.13.1'; our $VERSION = '2.13.2';
my $EMPTY = q{}; my $EMPTY = q{};
my $COMMA = q{,}; my $COMMA = q{,};
my ( $_self, $logger ); my ( $_self, $logger );
my $mess_warmingup1 = my $mess_warmingup1 =
qr/Scanner[ ]warming[ ]up[ ]-[ ]waiting[ ]\d*[ ]seconds/xsm; qr/Scanner[ ]warming[ ]up[ ]-[ ]waiting[ ]\d*[ ]seconds/xsm;
my $mess_warmingup2 = qr/wait[ ]for[ ]lamp[ ]warm-up/xsm; my $mess_warmingup2 = qr/wait[ ]for[ ]lamp[ ]warm-up/xsm;
my $mess_warmingup = qr/$mess_warmingup1|$mess_warmingup2/xsm; my $mess_warmingup = qr/$mess_warmingup1|$mess_warmingup2/xsm;
my $page_no = qr/page[ ](\d*)/xsm; my $page_no = qr/page[ ](\d*)/xsm;
skipping to change at line 546 skipping to change at line 546
); );
} }
# Make sure we are in temp directory # Make sure we are in temp directory
my $cwd = getcwd; my $cwd = getcwd;
if ( defined $options{dir} ) { chdir $options{dir} } if ( defined $options{dir} ) { chdir $options{dir} }
# Interface to scanimage # Interface to scanimage
my ( $write, $read ); my ( $write, $read );
my $error = IO::Handle->new; # this needed because of a bug in open3. my $error = IO::Handle->new; # this needed because of a bug in open3.
my $pid = IPC::Open3::open3( $write, $read, $error, $options{cmd} ); my $pid = IPC::Open3::open3( $write, $read, $error, $options{cmd} );
$logger->info("Forked PID $pid"); $logger->info("Forked PID $pid");
# change back to original directory # change back to original directory
chdir $cwd; chdir $cwd;
if ( defined $options{started_callback} ) { $options{started_callback}->() } if ( defined $options{started_callback} ) { $options{started_callback}->() }
if ( $_self->{abort_scan} ) { if ( $_self->{abort_scan} ) {
local $SIG{INT} = 'IGNORE'; local $SIG{INT} = 'IGNORE';
$logger->info("Sending INT signal to PID $pid and its children"); $logger->info("Sending INT signal to PID $pid and its children");
killfam 'INT', ($pid); killfam 'INT', ($pid);
 End of changes. 3 change blocks. 
3 lines changed or deleted 3 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)