diff options
-rwxr-xr-x | wpdf | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -9,7 +9,8 @@ my $alive; # number of children alive my %deptarget; # dependency => target my $parent = $$; # pid of parent -$SIG{HUP} = sub { kill 'INT', $parent if not --$alive }; +$SIG{USR1} = sub { kill 'HUP', 0 if not --$alive }; +$SIG{HUP} = sub { exit 0 }; # collect dependencies for given pdf files for my $target (@ARGV) { @@ -33,7 +34,7 @@ for my $target (@ARGV) { close $f; if (fork == 0) { system 'xpdf', '-remote', "wpdf-$target", $target; - kill 'HUP', $parent; + kill 'USR1', $parent; exit; } $alive++; |