public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Re: Symbol link trouble ?
@ 2001-04-25  8:21 Pierre Muller
  0 siblings, 0 replies; 9+ messages in thread
From: Pierre Muller @ 2001-04-25  8:21 UTC (permalink / raw)
  To: cygwin

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1850 bytes --]

Corinna wrote
 >On Wed, Apr 25, 2001 at 02:09:48PM +0200, Pierre Muller wrote:
 >> At 13:13 25/04/01 , vous avez écrit:
 > > >Could be a buffering technique of W95. I have just read the Microsoft
 > >KB article Q128932 "How Windows 95 Resolves Shortcut Links" but it
 > >doesn't obtain any additional information.
 >
 >   Using strace seems to indicate that the file test.h.lnk is read!
 >
 >Sure it's read. Cygwin doesn't see if the file is actually read or
 >if the file content is read from an already existing OS buffer.
 >
 >> Should I send you the binary link file and the strace output.
 >
 >Actually I have no hope to find something strange from the strace
 >but it doesn't hurt. Send the strace (not the link file which
 >is useless to me) as gzipped attachment to mailto:vinschen@redhat.com .
 >

You are probably right:

   there is no read after the call to CreateFileA
for the symlink disk file)

   I now tested it by first setting the link in the Windows explorer (WE)
and testing this, I found out the following:

   setting a link with WE works for cygwin bash
it simply reports the win32 path of the target file.

   Changing it with WE works normally and is reflected correctly.
  But removing the file in bash are setting it to another
target makes the windows link reappear unchanged !

   Note that if  remove the link from inside WE then
the subsequent call to ln works correctly
(the link is to the corrct file,
but in WE I still get no target file written !)

   It seems like WE is doing something more than just deleting
the  test.h.lnk disk file !




Pierre Muller
Institut Charles Sadron
6,rue Boussingault
F 67083 STRASBOURG CEDEX (France)
mailto:muller@ics.u-strasbg.fr
Phone : (33)-3-88-41-40-07  Fax : (33)-3-88-41-40-99

--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Symbol link trouble ?
  2001-06-26 15:28 John Wiersba
@ 2001-06-26 16:25 ` Larry Hall (RFK Partners, Inc)
  0 siblings, 0 replies; 9+ messages in thread
From: Larry Hall (RFK Partners, Inc) @ 2001-06-26 16:25 UTC (permalink / raw)
  To: John Wiersba, 'cygwin'

At 06:27 PM 6/26/2001, John Wiersba wrote:
>Searching the archives for info on symlink weirdness, I found the following
>reference with the same subject as above:
>
> http://sources.redhat.com/ml/cygwin/2001-04/msg01545.html which contains
>this:
>
> > Secondary questions:
> >    are these cygwin links supposed to be Win95 compatible ?
> > Because the Windows file explorer does tell em
> > that these files are Shortcuts
> > but the destination file is empty if I Right klick on the file and select 
> > properties!
>
>This seems to indicate that this bug only happens on Win95, but I've seen
>this same behavior on WinNT.  The really weird thing is that some of my
>shortcuts have been OK and others are not (as described above).  I have a
>script which removes and recreates the symlinks I use to set up my
>environment, and at the moment all of them are OK.  But I probably could
>reproduce this if it would help.  Also, from Windows Explorer I believe I've
>seen that the OK symlinks are shown as folder shortcuts but the broken ones
>are shown as file shortcuts.  However, all of the symlinks (even the broken
>shortcut ones) worked under cygwin -- it was only under WinNT that I noticed
>any difference.  Also, I noticed that I couldn't fix the target path of the
>broken shortcut (via Properties) because it seemed to be locked by WinNT.



Yes, Corinna brought up this issue a while ago (maybe it was just on 
the developer's list - I don't recall).  As it turns out, short-cuts
that both Windows and Cygwin can use seem difficult to provide.  If
you're curious about the details, you might want to see if you can find
her discussion of the issue in the email archives.



Larry Hall                              lhall@rfk.com
RFK Partners, Inc.                      http://www.rfk.com
118 Washington Street                   (508) 893-9779 - RFK Office
Holliston, MA 01746                     (508) 893-9889 - FAX


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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Symbol link trouble ?
@ 2001-06-26 15:28 John Wiersba
  2001-06-26 16:25 ` Larry Hall (RFK Partners, Inc)
  0 siblings, 1 reply; 9+ messages in thread
From: John Wiersba @ 2001-06-26 15:28 UTC (permalink / raw)
  To: 'cygwin'

Searching the archives for info on symlink weirdness, I found the following
reference with the same subject as above:

http://sources.redhat.com/ml/cygwin/2001-04/msg01545.html which contains
this:

> Secondary questions:
>    are these cygwin links supposed to be Win95 compatible ?
> Because the Windows file explorer does tell em
> that these files are Shortcuts
> but the destination file is empty if I Right klick on the file and select 
> properties!

This seems to indicate that this bug only happens on Win95, but I've seen
this same behavior on WinNT.  The really weird thing is that some of my
shortcuts have been OK and others are not (as described above).  I have a
script which removes and recreates the symlinks I use to set up my
environment, and at the moment all of them are OK.  But I probably could
reproduce this if it would help.  Also, from Windows Explorer I believe I've
seen that the OK symlinks are shown as folder shortcuts but the broken ones
are shown as file shortcuts.  However, all of the symlinks (even the broken
shortcut ones) worked under cygwin -- it was only under WinNT that I noticed
any difference.  Also, I noticed that I couldn't fix the target path of the
broken shortcut (via Properties) because it seemed to be locked by WinNT.

-- John Wiersba

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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Symbol link trouble ?
  2001-04-25  5:14       ` Pierre Muller
@ 2001-04-25  5:31         ` Corinna Vinschen
  0 siblings, 0 replies; 9+ messages in thread
From: Corinna Vinschen @ 2001-04-25  5:31 UTC (permalink / raw)
  To: cygwin

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1030 bytes --]

On Wed, Apr 25, 2001 at 02:09:48PM +0200, Pierre Muller wrote:
> At 13:13 25/04/01 , vous avez écrit:
> >Could be a buffering technique of W95. I have just read the Microsoft
> >KB article Q128932 "How Windows 95 Resolves Shortcut Links" but it
> >doesn't obtain any additional information.
> 
>   Using strace seems to indicate that the file test.h.lnk is read!

Sure it's read. Cygwin doesn't see if the file is actually read or
if the file content is read from an already existing OS buffer.

> Should I send you the binary link file and the strace output.

Actually I have no hope to find something strange from the strace
but it doesn't hurt. Send the strace (not the link file which
is useless to me) as gzipped attachment to mailto:vinschen@redhat.com .

Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Developer                                mailto:cygwin@cygwin.com
Red Hat, Inc.

--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Symbol link trouble ?
  2001-04-25  4:13     ` Corinna Vinschen
@ 2001-04-25  5:14       ` Pierre Muller
  2001-04-25  5:31         ` Corinna Vinschen
  0 siblings, 1 reply; 9+ messages in thread
From: Pierre Muller @ 2001-04-25  5:14 UTC (permalink / raw)
  To: Corinna Vinschen

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1471 bytes --]

At 13:13 25/04/01 , vous avez écrit:
>On Wed, Apr 25, 2001 at 12:40:40PM +0200, Pierre Muller wrote:
> >
> > >Aaargh! Really? I don't have any 95 for testing purposes so
> > >I can't look for this. Did you ever think about upgrading to
> > >OSR2, 98, ME, NT, W2K? Ok, ok, seriously, if you can't live
> >
> > OS version is 4.00.950 B
> >    B means OSR 2, no ?
>
>I think so.
>
> > >with that, you should set your CYGWIN environment variable to
> > >contain "nowinsymlinks". In that case, the old symlink method
> > >is used again.
> >
> >   Adding nowinsymlinks to CYGWIN env variable does
> > indeed cure the problem !
> >
> >    I also find this bug quite strange:
> > the wrong destination to the symbolic link is
> > kept even if cygwin DLL is unloaded from memory
> > (at least Taskinfo does not see this file as open anymore !)
> > Where can this information be kept then ???
>
>Could be a buffering technique of W95. I have just read the Microsoft
>KB article Q128932 "How Windows 95 Resolves Shortcut Links" but it
>doesn't obtain any additional information.

  Using strace seems to indicate that the file test.h.lnk is read!
Should I send you the binary link file and the strace output.



Pierre Muller
Institut Charles Sadron
6,rue Boussingault
F 67083 STRASBOURG CEDEX (France)
mailto:muller@ics.u-strasbg.fr
Phone : (33)-3-88-41-40-07  Fax : (33)-3-88-41-40-99

--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Symbol link trouble ?
  2001-04-25  3:45   ` Pierre Muller
@ 2001-04-25  4:13     ` Corinna Vinschen
  2001-04-25  5:14       ` Pierre Muller
  0 siblings, 1 reply; 9+ messages in thread
From: Corinna Vinschen @ 2001-04-25  4:13 UTC (permalink / raw)
  To: cygwin

On Wed, Apr 25, 2001 at 12:40:40PM +0200, Pierre Muller wrote:
> 
> >Aaargh! Really? I don't have any 95 for testing purposes so
> >I can't look for this. Did you ever think about upgrading to
> >OSR2, 98, ME, NT, W2K? Ok, ok, seriously, if you can't live
> 
> OS version is 4.00.950 B
>    B means OSR 2, no ?

I think so.

> >with that, you should set your CYGWIN environment variable to
> >contain "nowinsymlinks". In that case, the old symlink method
> >is used again.
> 
>   Adding nowinsymlinks to CYGWIN env variable does
> indeed cure the problem !
> 
>    I also find this bug quite strange:
> the wrong destination to the symbolic link is
> kept even if cygwin DLL is unloaded from memory
> (at least Taskinfo does not see this file as open anymore !)
> Where can this information be kept then ???

Could be a buffering technique of W95. I have just read the Microsoft
KB article Q128932 "How Windows 95 Resolves Shortcut Links" but it
doesn't obtain any additional information.

Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Developer                                mailto:cygwin@cygwin.com
Red Hat, Inc.

--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Symbol link trouble ?
  2001-04-25  3:28 ` Corinna Vinschen
@ 2001-04-25  3:45   ` Pierre Muller
  2001-04-25  4:13     ` Corinna Vinschen
  0 siblings, 1 reply; 9+ messages in thread
From: Pierre Muller @ 2001-04-25  3:45 UTC (permalink / raw)
  To: Corinna Vinschen

>Aaargh! Really? I don't have any 95 for testing purposes so
>I can't look for this. Did you ever think about upgrading to
>OSR2, 98, ME, NT, W2K? Ok, ok, seriously, if you can't live

OS version is 4.00.950 B
   B means OSR 2, no ?

>with that, you should set your CYGWIN environment variable to
>contain "nowinsymlinks". In that case, the old symlink method
>is used again.

  Adding nowinsymlinks to CYGWIN env variable does
indeed cure the problem !

   I also find this bug quite strange:
the wrong destination to the symbolic link is
kept even if cygwin DLL is unloaded from memory
(at least Taskinfo does not see this file as open anymore !)
Where can this information be kept then ???

Personally I don't care much about having links that are not windows 
compatible,
but I would like to have working links.

   I will add CYGWIN=nowinsymlinks
to my startup script for now, but this problem
should be either resolved or this option should become
default for win95 if it is reproduced by others !




Pierre Muller
Institut Charles Sadron
6,rue Boussingault
F 67083 STRASBOURG CEDEX (France)
mailto:muller@ics.u-strasbg.fr
Phone : (33)-3-88-41-40-07  Fax : (33)-3-88-41-40-99

--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Symbol link trouble ?
  2001-04-25  2:19 Pierre Muller
@ 2001-04-25  3:28 ` Corinna Vinschen
  2001-04-25  3:45   ` Pierre Muller
  0 siblings, 1 reply; 9+ messages in thread
From: Corinna Vinschen @ 2001-04-25  3:28 UTC (permalink / raw)
  To: cygwin

On Wed, Apr 25, 2001 at 11:14:48AM +0200, Pierre Muller wrote:
> 
>   I have a big problem if I try to redefine an existing symbolic link
> within cygwin environment.
> (I just downloaded the new cygwin version, but it
> does not seem to cure the problem)
> 
> To illustrate the problem, I wrote a little script (file 'test' below)
> It does not seem to depend on the
> shell used
> "sh test" and "bash test"
> give the same result.
> 
>  >>>>>Start of file 'test'
> rm test.h
> echo "First" > first.h
> echo "Second" > second.h
> echo "Creating test.h as a link to first.h"
> ln -s first.h test.h
> ls -l *.h
> echo "Removing test.h"
> rm test.h
> ls -l *.h
> echo "Recreating test.h as a link to second.h"
> ln -s second.h test.h
> ls -l *.h
> echo "cat test.h"
> cat test.h
> echo "cat second.h"
> cat second.h
>  >>>>>End of file 'test'
> 
> What is really strange is that
> the test.h.lnk file that is on disk (and can be seem on normal Dos box)
> does indeed contain the correct name of second.h
> but Cygwin programs seem to still think that the link is to first.h

That's weird. I can't reproduce that on W2K. Does anybody see
the same problem? Which OS?

Corinna
> 
> Secondary questions:
>    are these cygwin links supposed to be Win95 compatible ?
> Because the Windows file explorer does tell em
> that these files are Shortcuts
> but the destination file is empty if I Right klick on the file and select 
> properties!

Aaargh! Really? I don't have any 95 for testing purposes so
I can't look for this. Did you ever think about upgrading to
OSR2, 98, ME, NT, W2K? Ok, ok, seriously, if you can't live
with that, you should set your CYGWIN environment variable to
contain "nowinsymlinks". In that case, the old symlink method
is used again.

Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Developer                                mailto:cygwin@cygwin.com
Red Hat, Inc.

--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Symbol link trouble ?
@ 2001-04-25  2:19 Pierre Muller
  2001-04-25  3:28 ` Corinna Vinschen
  0 siblings, 1 reply; 9+ messages in thread
From: Pierre Muller @ 2001-04-25  2:19 UTC (permalink / raw)
  To: cygwin

  I have a big problem if I try to redefine an existing symbolic link
within cygwin environment.
(I just downloaded the new cygwin version, but it
does not seem to cure the problem)

To illustrate the problem, I wrote a little script (file 'test' below)
It does not seem to depend on the
shell used
"sh test" and "bash test"
give the same result.

 >>>>>Start of file 'test'
rm test.h
echo "First" > first.h
echo "Second" > second.h
echo "Creating test.h as a link to first.h"
ln -s first.h test.h
ls -l *.h
echo "Removing test.h"
rm test.h
ls -l *.h
echo "Recreating test.h as a link to second.h"
ln -s second.h test.h
ls -l *.h
echo "cat test.h"
cat test.h
echo "cat second.h"
cat second.h
 >>>>>End of file 'test'

What is really strange is that
the test.h.lnk file that is on disk (and can be seem on normal Dos box)
does indeed contain the correct name of second.h
but Cygwin programs seem to still think that the link is to first.h

Does cygwin DLL hold some kind of cache for links that does not get updated 
properly here ?

Secondary questions:
   are these cygwin links supposed to be Win95 compatible ?
Because the Windows file explorer does tell em
that these files are Shortcuts
but the destination file is empty if I Right klick on the file and select 
properties!
(This is already the case of a symbolic link only defined once)

    If this problem is not reproducable on other win95 boxes
I can send my 'cygcheck -rsv' output, but I already check that there is 
only one cygwin DLL
version (major 1003 minor 1), but as I already told,
this problem was preexisting.



Pierre Muller
Institut Charles Sadron
6,rue Boussingault
F 67083 STRASBOURG CEDEX (France)
mailto:muller@ics.u-strasbg.fr
Phone : (33)-3-88-41-40-07  Fax : (33)-3-88-41-40-99

--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2001-06-26 16:25 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-04-25  8:21 Symbol link trouble ? Pierre Muller
  -- strict thread matches above, loose matches on Subject: below --
2001-06-26 15:28 John Wiersba
2001-06-26 16:25 ` Larry Hall (RFK Partners, Inc)
2001-04-25  2:19 Pierre Muller
2001-04-25  3:28 ` Corinna Vinschen
2001-04-25  3:45   ` Pierre Muller
2001-04-25  4:13     ` Corinna Vinschen
2001-04-25  5:14       ` Pierre Muller
2001-04-25  5:31         ` Corinna Vinschen

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 read-only IMAP folder(s) and NNTP newsgroup(s).