delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/02/21/16:10: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: <54360-22003252121101424@M2W051.mail2web.com>
X-Priority: 3
Reply-To: lhall AT rfk DOT com
X-Originating-IP: 209.113.174.244
From: "lhall AT pop DOT ma DOT ultranet DOT com" <lhall AT pop DOT ma DOT ultranet DOT com>
To: rmcgowan AT veritas DOT com, cygwin AT cygwin DOT com
Subject: Re: Symlink to script fails
Date: Fri, 21 Feb 2003 16:10:14 -0500
MIME-Version: 1.0
X-OriginalArrivalTime: 21 Feb 2003 21:10:14.0063 (UTC) FILETIME=[A05B9BF0:01C2D9ED]
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id h1LLAOl31454

Here's what I did:

lhall AT lhall->cat foo
#!c:/winnt/system32/cmd.exe
lhall AT lhall->foo
Microsoft Windows 2000 [Version 5.00.2195]
(C) Copyright 1985-2000 Microsoft Corp.

C:\tmp>exit
lhall AT lhall->ls -l bar
lrwxrwxrwx    1 lhall    Domain U       14 Feb 21 15:57 bar -> foo
lhall AT lhall->bar
Microsoft Windows 2000 [Version 5.00.2195]
(C) Copyright 1985-2000 Microsoft Corp.

C:\tmp>exit
lhall AT lhall->uname -a
CYGWIN_NT-5.0 lhall 1.3.20(0.73/3/2) 2003-02-08 12:10 i686 unknown unknown
Cygwin

I tried with making the symlink as a Windows shortcut (the default) and 
the (older) magic options (nowinsymlinks).  Worked for me either way
whether I used /bin/sh or /bin/bash as my initial shell.  

The problem is definitely with the native Perl's (or CQPerl's)
interpretation
of what it gets.

Larry


Original Message:
-----------------
From: Bob McGowan rmcgowan AT veritas DOT com
Date: Fri, 21 Feb 2003 12:23:15 -0800
To: lhall AT rfk DOT com, adefaria AT salira DOT com, cygwin AT cygwin DOT com
Subject: Re: Symlink to script fails


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/


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

- Raw text -


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