public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* `CYGWIN=winsymlinks:nativestrict`, `ln -s target link` fails if target doesn't exist
@ 2016-04-28 22:18 Gene Pavlovsky
  2016-04-28 23:48 ` Andrey Repin
  0 siblings, 1 reply; 15+ messages in thread
From: Gene Pavlovsky @ 2016-04-28 22:18 UTC (permalink / raw)
  To: cygwin

Hello everybody!

First post on this mailing list, my name is Gene, I'm from Russia,
long-time Linux user, but had to use Windows as desktop for the last 8
years. Cygwin really helps me to keep my sanity! Thanks :)

I have an issue to report:

Introduction: On a UNIX system, `ln -s target link` creates a link
regardless of target's existence.
This is used in some scripts, e.g. Gentoo's `run-crons` (which I also
use on Cygwin) uses a symlink pointing to the running process PID as
lockfile.
Issue: if `CYGWIN=winsymlinks:nativestrict` env var is set, running
`ln -s target link` completely fails (even though running `mklink link
target` in `cmd.exe` succeeds, same as `ln -s` does on UNIX). If
`CYGWIN=winsymlinks:native`, a non-native link is created.

So, `nativestrict` might break some (admittedly unorthodox) scripts.
With `native` these script work, but still a native link would be
preferrable and it is possible to create, but a non-native link is
created instead.

Bottom line, I think the native symlink creation code should be
checked and a possibility should be added to create links to
non-existent targets, rather than the current behavior of failing.

Thanks!
--Gene

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

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

end of thread, other threads:[~2016-10-09 19:06 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-28 22:18 `CYGWIN=winsymlinks:nativestrict`, `ln -s target link` fails if target doesn't exist Gene Pavlovsky
2016-04-28 23:48 ` Andrey Repin
2016-04-29  0:06   ` Eric Blake
2016-04-29  5:23     ` Andrey Repin
2016-04-29  0:09   ` Gene Pavlovsky
2016-04-29  1:46     ` Gene Pavlovsky
2016-04-29 12:03   ` Gene Pavlovsky
2016-04-29 12:15     ` Peter Rosin
2016-04-29 12:20       ` [cygwin] " Jason Pyeron
2016-04-30 12:35       ` Gene Pavlovsky
2016-10-05  3:56         ` Rinrin
2016-10-05  4:31           ` Marco Atzeri
2016-10-06 10:38           ` Gene Pavlovsky
2016-10-07  5:33             ` Rinrin
2016-10-09 19:16               ` Gene Pavlovsky

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).