This is the mail archive of the
mailing list for the Cygwin project.
RE: Why do symlinks need to be system files
- From: Igor Pechtchanski <pechtcha at cs dot nyu dot edu>
- To: "Mark R." <mcr2z at cs dot virginia dot edu>
- Cc: "'Gary R. Van Sickle'" <g dot r dot vansickle at worldnet dot att dot net>, <cygwin at cygwin dot com>
- Date: Wed, 2 Jul 2003 10:00:50 -0400 (EDT)
- Subject: RE: Why do symlinks need to be system files
- Reply-to: cygwin at cygwin dot com
The "old style" symlinks, which are text files marked "system" containing
just the path (and a magic number) are smaller and easier to create and
process than the "new style" symlinks, which are just Windows shortcuts.
The "new style" ones have the advantage of being recognized as links by
Windows (although you still can't launch a shortcut to a program from the
command line, I think), and the disadvantage of having to call Windows API
to create/use them (whereas the "old style" ones can simply be
read/written to using stdio).
I think the style of shortcut created by "ln -s" is controlled by the
"(no)winsymlinks" option in $CYGWIN.
Hope the above makes sense.
On Wed, 2 Jul 2003, Mark R. wrote:
> That does make sense. I've played around with using ln -s to create my own
> symlinks. The odd thing is that these are all being created as shortcuts vs
> this other method. Now that I'm in the "I'm just curious" mode - Does anyone
> know why the two different methods are used?
> -----Original Message-----
> From: email@example.com [mailto:firstname.lastname@example.org] On Behalf Of
> Gary R. Van Sickle
> Sent: Wednesday, July 02, 2003 1:37 AM
> To: email@example.com
> Subject: RE: Why do symlinks need to be system files
> > Mark R. wrote:
> > > Hello,
> > >
> > > I've been busy attempting to use WinInstaller LE to create an MSI
> > > package of cygwin so we can automatically deploy a customized build
> > > for our department. This works for the most part, however when I
> > > deploy this to a windows XP machine, all of the symlinks are broken.
> > > Ex/ vi doesn't work, however vim does.
> > >
> > > When I tracked down the problem, it appears that symlinks require
> > > the "system file" attribute to be set. Does anyone know why this is?
> > Because that's part of how Cygwin recognizes them as symlinks.
> To expand on that a bit, it's so Cygwin doesn't have to open and parse the
> actual contents of every file it sees on a path to see if it's a symlink; it
> only has to check those marked as system. Since it's rare to find many
> files marked system normally, this results in mega-savings speedwise.
> Now if Microsoft would only get hip to this whole symlink thing....
> Gary R. Van Sickle
> Brewer. Patriot.
|\ _,,,---,,_ firstname.lastname@example.org
ZZZzz /,`.-'`' -. ;-;;,_ email@example.com
|,4- ) )-,_. ,\ ( `'-' Igor Pechtchanski, Ph.D.
'---''(_/--' `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-. Meow!
"I have since come to realize that being between your mentor and his route
to the bathroom is a major career booster." -- Patrick Naughton
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html