delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/02/21/15:26:25

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/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
Message-ID: <3E568AB3.1030500@veritas.com>
Date: Fri, 21 Feb 2003 12:23:15 -0800
From: Bob McGowan <rmcgowan AT veritas DOT com>
Organization: VERITAS Software, Inc.
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20021130
X-Accept-Language: en-us, en
MIME-Version: 1.0
To: lhall AT rfk DOT com
CC: adefaria AT salira DOT com, cygwin AT cygwin DOT com
Subject: Re: Symlink to script fails
References: <410-220032521195727179 AT M2W036 DOT mail2web DOT com>
In-Reply-To: <410-220032521195727179@M2W036.mail2web.com>

I've been playing around with this, too.  I have a Windows 'native' version of 
Perl 5.8.0 available to play with and when I used it, I got the same error as 
Andrew did.

I'm not sure how you did your cmd.exe test?  I tried it, in the form of a 
shebang file.  It 'worked' but it did complain about the shebank line not being 
recognized.  But that's a side issue, just curious;-)

What I think is going on here has to do with how the "exec" for shebang does its 
thing.  The interpreter named in the shebang line is exec'd, with the path name 
of the script file as an argument.  I'd suggest that the Windows/DOS commands in 
question (my perl 5.8.0 and CQPerl) are unable to find the file, in the failing 
case, because they are reading a symlink, which they don't know how to deal 
with.  So they are reading the content of the symlink, not what it points to.

I'm not sure why cmd.exe isn't having the same problem.  Perhaps there's 
something in Windows/DOS program linking that needs to be done to get them to 
work with .lnk files?  Like the business of linking into a program the ability 
to do wild card expansion.

lhall AT pop DOT ma DOT ultranet DOT com wrote:
> I tried the same thing with c:/winnt/system32/cmd.exe (I don't have
> CQPerl ;-) ) and it worked fine.  Perhaps you can try that and see 
> if it points to a CQPerl problem or some local configuration issue.
> 
> 
> Larry
> 
> Original Message:
> -----------------
> From: Andrew DeFaria ADeFaria AT Salira DOT com
> Date: Fri, 21 Feb 2003 10:41:45 -0800
> To: cygwin AT cygwin DOT com
> Subject: Symlink to script fails
> 
> 
> I have need to use Rational's "CQPerl" which appears to be a derivative 
> of Active State Perl that allows me to use Perl to access Clearquest. I 
> have a perl script that does what I want however if I symlink that 
> script the symlinked invocation does not work! I've drastically reduced 
> the Perl script to simply demonstrate the problem:
> 
> $ cat foo
> #!c:/Progra~1/Rational/ClearQuest/CQPerl
> print "Hello world\n";
> $ foo
> Hello world
> $ ls -l bar
> lrwxrwxrwx    1 adefaria Domain U       86 Feb 21 10:38 bar -> foo*
> $ bar
> Can't open perl script "./bar": No such file or directory
> 
> Now if I change the shebang line to #!/bin/perl then everything works 
> but as I said I need to use CQPerl.
> 
> Ideas?
> 
> 
> 
> --
> Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
> Bug reporting:         http://cygwin.com/bugs.html
> Documentation:         http://cygwin.com/docs.html
> FAQ:                   http://cygwin.com/faq/
> 
> 
> --------------------------------------------------------------------
> mail2web - Check your email from the web at
> http://mail2web.com/ .
> 
> 
> 
> --
> Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
> Bug reporting:         http://cygwin.com/bugs.html
> Documentation:         http://cygwin.com/docs.html
> FAQ:                   http://cygwin.com/faq/

-- 
Bob McGowan
Staff Development Engineer
VERITAS Software
rmcgowan AT veritas DOT com


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.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