[tex-live] epstopdf does not propagate exit code
oberdiek at uni-freiburg.de
Sun Sep 13 22:49:17 CEST 2009
On Sun, Sep 13, 2009 at 10:32:37PM +0200, Reinhard Kotucha wrote:
> On 13 September 2009 T T wrote:
> > I've noticed that epstopdf utility does not propagate exit code from
> > ghostscript (WinXP), so I can't detect GS failure. Any chance to fix
> > that?
> This is a known problem and I sent Gerben a patch already. He said
> that he was on leave and will reply later. No other response so far.
> Here is the patch I sent him:
> --- epstopdf.pl 2009-07-20 02:59:05.000000000 +0200
> +++ epstopdf.pl-new 2009-08-25 22:58:06.000000000 +0200
> @@ -427,5 +427,6 @@
> print OUT "\ngrestore\n" if $BBCorrected;
> +exit ($?/256) if $?;
> warning "BoundingBox not found" unless $BBCorrected;
> debug "Ready.";
> The Perl variable $? contains a 16 bit number, the most significant
> byte contains the exit code. Thus the division by 256.
And ghostscript could be aborted by a signal (the lower 8 bits),
example, see pdfcrop.
Heiko <oberdiek at uni-freiburg.de>
More information about the tex-live