From: Ed L Cashin <ecashin@terry.uga.edu>
Cc: Hans Hagen <pragma@wxs.nl>, Marc van Dongen <dongen@cs.ucc.ie>,
Patrick Gundlach <gundlach@irb.cs.uni-dortmund.de>,
ConTeXt <ntg-context@ntg.nl>
Subject: Re: metapost not invoked? mpgraph.1 not created
Date: 15 Mar 2001 14:45:12 -0500 [thread overview]
Message-ID: <m3k85qsto7.fsf@terry.uga.edu> (raw)
In-Reply-To: <86elvzp9t7.fsf@office.admaster.pl>
Slawek Zak <zaks@prioris.mini.pw.edu.pl> writes:
...
> Which makes perl try to run the script on UNIX systems without
> checking if it's executable (texutil was -x in my case) and, which is
> more problematic, doesn't check for possible execution errors. I've
> proposed some time ago to change the call to something like:
>
> ...
> if (! -x $ScriptName) {
> die("Nonexecutable script, fix the permisions for $ScriptName\n");
> } else {
> system ("$ScriptName $Options") or die $!;
> }
> ...
>
> What do you think?
I think it's not necessary to be that specific, since perl knows what
the last error was (it's in the $! variable), and you're limiting
yourself to just one error.
If the $ScriptName wasn't there at all, for example, your error
message would be misleading. Instead, let things take care of
themselves:
$ cp /bin/ls .
$ chmod 644 ls
$ perl -e 'die "Error: could not run ls: $!" if system "./ls"'
Error: could not run ls: Permission denied at -e line 1.
... and anyone who's familiar with UN*X has seen "Permission denied"
when the permission to execute is not set.
--
--Ed Cashin PGP public key:
ecashin@terry.uga.edu http://www.terry.uga.edu/~ecashin/pgp/
next prev parent reply other threads:[~2001-03-15 19:45 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <Your message of "Mon, 19 Feb 2001 17:22:59 +0100." <3.0.6.32.20010219172259.0157a600@server-1>
2001-02-20 10:48 ` Patrick Gundlach
2001-02-20 11:53 ` Hans Hagen
2001-02-20 15:42 ` Ed L Cashin
2001-02-20 15:58 ` Marc van Dongen
2001-02-20 16:40 ` Hans Hagen
2001-03-15 11:10 ` Slawek Zak
2001-03-15 11:14 ` Slawek Zak
2001-03-15 12:41 ` Patrick Gundlach
2001-03-15 19:45 ` Ed L Cashin [this message]
2001-02-20 21:22 ` Ed L Cashin
2001-02-21 12:51 ` Marc van Dongen
2001-02-21 16:53 ` Ed L Cashin
2001-02-21 17:17 ` Marc van Dongen
2001-02-21 17:22 ` Marc van Dongen
2001-02-21 2:08 ` Uwe Koloska
2001-02-22 15:55 Patrick Gundlach
-- strict thread matches above, loose matches on Subject: below --
2001-02-22 15:39 Patrick Gundlach
[not found] <Your message of "Tue, 20 Feb 2001 12:53:44 +0100." <3.0.6.32.20010220125344.01cc87b0@server-1>
2001-02-20 14:16 ` Patrick Gundlach
2001-02-20 16:46 ` Hans Hagen
2001-02-20 21:35 ` Ed L Cashin
2001-02-20 14:13 Patrick Gundlach
[not found] <Your message of "Mon, 19 Feb 2001 15:59:52 +0100." <3.0.6.32.20010219155952.019f7180@server-1>
2001-02-19 15:47 ` Patrick Gundlach
2001-02-19 16:22 ` Hans Hagen
[not found] <Your message of "Mon, 19 Feb 2001 11:47:49 +0100." <3.0.6.32.20010219114749.017fb4d0@server-1>
2001-02-19 12:57 ` Patrick Gundlach
2001-02-19 14:59 ` Hans Hagen
2001-02-21 2:16 ` Uwe Koloska
2001-02-17 15:24 Patrick Gundlach
2001-02-19 10:47 ` Hans Hagen
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=m3k85qsto7.fsf@terry.uga.edu \
--to=ecashin@terry.uga.edu \
--cc=dongen@cs.ucc.ie \
--cc=gundlach@irb.cs.uni-dortmund.de \
--cc=ntg-context@ntg.nl \
--cc=pragma@wxs.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).