From: Ed L Cashin <ecashin@coe.uga.edu>
Cc: ntg-context@ntg.nl
Subject: Re: pdftops
Date: 21 Sep 2000 10:38:36 -0400 [thread overview]
Message-ID: <m37l85zu6r.fsf@coe.uga.edu> (raw)
In-Reply-To: Hans Hagen's message of "Thu, 21 Sep 2000 13:00:33 +0200"
Hans Hagen <pragma@wxs.nl> writes:
> Hi,
>
> the perl line:
>
> system("pdftops") ;
>
> does not work any longer with the latest perl and pdftops. It does
> work when the program is on the same path, but not otherwise. This
> is strange, since pdfetex in the same binpath as pdftops does
> work. Did they change perl?
Yes, the latest version of perl is very different. Version 5.6 has
some big differences, including new features that are incompatible
with the old perl 5 (e.g., now "use vars" is obsolete because of the
introduction of "our" variables).
But I can't think of why the new perl would make that simple system
call break. Looking at the entry for "system" in the perlfunc
manpage, I see ...
Beginning with v5.6.0, Perl will attempt to flush all
files opened for output before any operation that may
do a fork, but this may not be supported on some
platforms (see the perlport manpage). To be safe, you
may need to set `$|' ($AUTOFLUSH in English) or call
the `autoflush()' method of `IO::Handle' on any open
handles.
But I don't know if that's relevant. Maybe try some error checking:
{
#-----------this command makes a log file on UNIX-type OS
my $cmd = "pdftops foo bar 1> /tmp/test.log 2>&1";
my $err = system($cmd);
if ($err == -1) {
die "Error: could not start pdftops: $!";
} elsif ($err) {
$err /= 256; # find real exit status
die "Error: pdftops returned error status: $err";
}
print "Oh, happy day!\n";
}
--
--Ed Cashin PGP public key:
ecashin@coe.uga.edu http://www.coe.uga.edu/~ecashin/pgp/
prev parent reply other threads:[~2000-09-21 14:38 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-09-21 11:00 pdftops Hans Hagen
2000-09-21 14:38 ` Ed L Cashin [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m37l85zu6r.fsf@coe.uga.edu \
--to=ecashin@coe.uga.edu \
--cc=ntg-context@ntg.nl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).