www.delorie.com/archives/browse.cgi | search |
X-Spam-Check-By: | sourceware.org |
To: | cygwin AT cygwin DOT com |
From: | Andrew DeFaria <Andrew AT DeFaria DOT com> |
Subject: | Re: gracebat runs in X, but not as a system call from a perl script |
Date: | Wed, 21 Feb 2007 10:42:06 -0600 |
Lines: | 40 |
Message-ID: | <erhsov$k91$1@sea.gmane.org> |
References: | <1172047813 DOT 45dc07c528fc4 AT easymail-old DOT hol DOT gr> <1172071907 DOT 45dc65e379827 AT easymail-old DOT hol DOT gr> |
Mime-Version: | 1.0 |
User-Agent: | Thunderbird 1.5.0.9 (Windows/20061207) |
In-Reply-To: | <1172071907.45dc65e379827@easymail-old.hol.gr> |
X-IsSubscribed: | yes |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Id: | <cygwin.cygwin.com> |
List-Unsubscribe: | <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com> |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sourceware.org/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
Sender: | cygwin-owner AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
Delivered-To: | mailing list cygwin AT cygwin DOT com |
moka AT hol DOT gr wrote: > Forgot to say that the error message is :the system cannot > execute the specified program > (failure code 256) > >> I do startxwin to open X and then do >> gracebat <parameters> >> this does what I want, namely produce a jpeg file >> >> Now if I try this for a perl script(run from X) >> system(gracebat <parameters>) >> >> i.e. the exact same line that produced the right result >> I get an error. >> >> I guess the reason is that I am using the activestate perl instead of the >> cygwin >> perl; anyway there were reasons for that, not sure if valid or not[the >> reason >> was getting DBD::Oracle to work, which was a huge pain]. >> So I guess "system" to perl is whatever system Activestate was installed >> for, >> i.e. Windows. >> The question is: >> Is it possible to get around this? >> Can I tweak the system command so that it executes gracebat(but >> otherwise use Activestate, e.g. for Oracle DBI queries? If you use Activestate then I believe it invokes cmd.exe for your system call. Take the parameter you passed to system in your Activestate perl and plug it into a cmd.exe shell (copy and paste). Massage until it works under cmd and copy and paste that new command back into your perl and it should work. My guesses would be that you are using "C:/path/to/gracebat <parms>" and Activestate invoking cmd can't find that or perhaps you are literally using "gracebat <parms>" and gracebat is in Cygwin's PATH but not cmd's PATH. -- Andrew DeFaria <http://defaria.com> If work is so terrific, why do they have to pay you to do it? -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |