[tex-live] epstopdf does not propagate exit code

Reinhard Kotucha reinhard.kotucha at web.de
Wed Sep 16 00:18:51 CEST 2009

On 14 September 2009 Manuel Pégourié-Gonnard wrote:

 > Reinhard Kotucha a écrit :
 > >  > And ghostscript could be aborted by a signal (the lower 8 bits),
 > >  > example, see pdfcrop.
 > > 
 > > I'm not sure if signal handlers always work reliably on Windows.  And
 > > they probably behave differently on MSYS.
 > > 
 > I agree with Heiko: maybe signals weren't handled properly, but
 > trying doesn't hurt. [...]

Hi Manuel,
you are right, trying doesn't hurt.  If things are not vitally
important, it's appropriate to simply try and to accept that things
don't work everywhere.  I was confronted with this problem when I
wrote getnonfreefonts.  I'm using signal handlers in order to remove
temporary files if the program aborts unexpectedly.  On Windows I'm
using signals as advertized in the Microsoft runtime library source
code.  A quick test disclosed that nearly *nothing* works on Windows.
But I have no another choice.

On the other hand, it's not a big problem if the signal handlers don't
work properly on Windows.  The worst thing which can happen is that a
few files are left over in %TEMP% if the program aborts unexpectedly.
But even then, who cares?  The amount of crap in the registry is
growing much faster than the stuff in %TEMP% anyway.

 > Anyway, perldoc -f system recommends
 > [...]
 > and doesn't say that it's irrelevant on windows. [...]

The official Perl documentation only describes how to use Perl on
Unix.  There are a few remarks about Windows too, but there is nothing
which explains Windows deficiencies.  When Norbert found out that
exec() runs amok on Windows I went to a bookstore and browsed some
books about "Perl for Windows".  These books only describe some extra
modules for Windows but none of them mentioned that on Windows pipes
damage binary files, exec() runs amok, and that most signals are
ignored, let alone signal handlers, and so on.

If you are going to write a Perl script which is supposed to work on
Windows, you have to check everything by trial and error yourself.


Reinhard Kotucha			              Phone: +49-511-3373112
Marschnerstr. 25
D-30167 Hannover	                      mailto:reinhard.kotucha at web.de
Microsoft isn't the answer. Microsoft is the question, and the answer is NO.

More information about the tex-live mailing list