delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2007/02/23/06:04:46

X-Spam-Check-By: sourceware.org
Message-ID: <1172228651.45deca2b5c9bf@easymail-old.hol.gr>
Date: Fri, 23 Feb 2007 13:04:11 +0200
From: moka AT hol DOT gr
To: cygwin AT cygwin DOT com
Subject: Re: gracebat runs in X, but not as a system call from a perl script
References: <1172047813 DOT 45dc07c528fc4 AT easymail-old DOT hol DOT gr> <Pine DOT GSO DOT 4 DOT 63 DOT 0702211138540 DOT 13824 AT access1 DOT cims DOT nyu DOT edu> <1172127807 DOT 45dd403f54ad1 AT easymail-old DOT hol DOT gr> <1172136373 DOT 45dd61b57669b AT easymail-old DOT hol DOT gr> <erke06$nbo$1 AT sea DOT gmane DOT org>
In-Reply-To: <erke06$nbo$1@sea.gmane.org>
MIME-Version: 1.0
User-Agent: Internet Messaging Program (IMP) 3.2.2
X-Virus-Status: Clean
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.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

Αρχικό μήνυμα από  Andrew DeFaria  
PROBLEM solved: TOOK /usr/grace/bin/xmgrace.exe and copied it to
/bin/gracebat.exe

Works fine now and is consistent with the explanation that activestate does not

properly interpret symlinks
  
> > Better now, but still something is missing cygwin is under c:\cygwin e.g.
> c:\cygwin\bin
> >
> > There I see
> >
> > \bin\gracebat.exe->/usr/grace/bin/xmgrace.exe
> >   
> What is this? There is no \bin\gracebat.exe. Cygwin doesn't use 
> backslashes in path names. So then how do you "see" this?
typo, I meant /
Also, you can look at the packages list to see what each soft link links to
> > but also the same for /bin/xmgrace.exe
> >   
> Ditto. How do you "see" this. BTW "this" doesn't look like "that" which 
> looked more like a symlink.
> 
> BTW2 You are aware that Cygwin mounts C:\Cygwin\bin onto both /bin and 
> /usr/bin...
> > The script directory is c:\cygwin\mydir
> >
> > so in the perl script
> > my $updir='..';
> > my $gracebat=$updir .'/usr/grace/bin/xmgrace ';
> >   
> What's this $updir stuff? It's unnecessary.
> 


> Also, are you executing a .bat file as alluded to in the past, or 
> gracebat.exe or xmgrace.exe. This is sooo confusing!
> > system("$gracebat ... -printfile $printfile....");
> >   
> Might as well show what's contained in the "..." portions... and 
> $printfile for that matter! Don't post code fragments that wouldn't get 
> through the Perl interpreter! Post enough of your Perl code so that 
> somebody else could copy and paste it to Perl and expect no errors. 
> Granted we may not have xmgrace.exe but at least we'd have enough of the 
> "story".
> > prints to the screen, not the file.
> >   
> Again, are you running Cygwin's perl or ActiveState. Is gracebat.exe (or 
> xmgrace.exe) a Windows oriented executable or Cygwin oriented executable?
> 
> What happens if you type the contents of "$gracebat ... -printfile 
> $printfile..." in to the bash shell directly?
> > This looks right to me, since gracebat and xmgrace link to the SAME
> >  executable, xmgrace.exe.
> >
> > How can I get $gracebat to do whatit would do on linux, i.e.
> >  write to a file(I tested this on linux and it works fine)
> > ? 
> >   
> Did you test it on Cygwin? By that I mean can you type in the command 
> line to the bash shell such that it works correctly? Once that's achieve 
> the task is to get Perl to compose the same command line.
> >   
> >>> On Wed, 21 Feb 2007, moka wrote:
> >>>
> >>>       
> >>>> 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?
> >>>>         
> >>> As the package list shows (I don't have grace installed), gracebat is a
> >>> symlink.  A Windows program like ActiveState Perl will not understand
> >>> Cygwin's symlinks (nor will it run a shell script, since it uses cmd as
> >>> its shell).  The easiest thing you can do is invoke a Cygwin shell
> (bash,
> >>> sh, pdksh, etc) and let it run the command.  That way, no matter what
> the
> >>> command is (an executable, or a symlink, or a shell script), the shell
> >>> will interpret it for you and invoke it properly.
> >>>
> >>> Be careful with quoting -- you may want to use the list form of
> >>> system()...
> >>> 	Igor
> >>> -- 
> >>> 				http://cs.nyu.edu/~pechtcha/
> >>>       |\      _,,,---,,_	    pechtcha AT cs DOT nyu DOT edu | igor AT watson DOT ibm DOT com
> >>> ZZZzz /,`.-'`'    -.  ;-;;,_		Igor Peshansky, Ph.D. (name changed!)
> >>>      |,4-  ) )-,_. ,\ (  `'-'		old name: Igor Pechtchanski
> >>>     '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!
> >>>
> >>> Freedom is just another word for "nothing left to lose"...  -- Janis
> >>>       
> >> Joplin
> >>     
> >>> --
> >>> 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/
> >>>
> >>>
> >>>       
> >>
> >>
> >> --
> >> 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/
> >>
> >>
> >>     
> >
> >
> >
> >
> >   
> 
> -- 
> Andrew DeFaria <http://defaria.com>
> Deja Fu: The feeling that you've screwed this up before.
> 
> 
> --
> 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/
> 
> 




--
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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019