| www.delorie.com/archives/browse.cgi | search |
| X-Recipient: | archive-cygwin AT delorie DOT com |
| DomainKey-Signature: | a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id |
| :list-unsubscribe:list-subscribe:list-archive:list-post | |
| :list-help:sender:message-id:date:from:mime-version:to:subject | |
| :references:in-reply-to:content-type:content-transfer-encoding; | |
| q=dns; s=default; b=mzSvfZMGVIfDqXakLmxEQENTX6kFzbhu9aYA7K97SU/ | |
| UjhX+Ik5PLeZmwijysn88kKnJI1z6kE8HZESVwgKOmTUKM8KlQfql+TTpJtcDBxq | |
| Xp7072z/foyqmRVMNk2jzBwqJWR5FSNrojcAJlVP3f0XG8ZGOQnzRlA42AHPcj4o | |
| = | |
| DKIM-Signature: | v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id |
| :list-unsubscribe:list-subscribe:list-archive:list-post | |
| :list-help:sender:message-id:date:from:mime-version:to:subject | |
| :references:in-reply-to:content-type:content-transfer-encoding; | |
| s=default; bh=UavzpYFSakJ8lAv3fUccBAxjifE=; b=D6AXqhO1st1cr4FL5 | |
| uLXQUDDYmG1ZU1/3/Y01GK2aAHHBwLyvh5qHeQggc00H/tm8YbcwdFTsP1rTrW5x | |
| irFgj7yEHy3f8GJAl7YniYzlBVxa65OGksl/lswem2Cwo/4rvArVr86ZYaSjX4a5 | |
| eb14+cWmmCTEXFJlZZwqfFA+wY= | |
| Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
| List-Id: | <cygwin.cygwin.com> |
| List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
| List-Archive: | <http://sourceware.org/ml/cygwin/> |
| List-Post: | <mailto:cygwin AT cygwin DOT com> |
| List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/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 |
| Authentication-Results: | sourceware.org; auth=none |
| X-Virus-Found: | No |
| X-Spam-SWARE-Status: | No, score=-1.6 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD autolearn=ham version=3.3.2 |
| X-HELO: | Ishtar.hs.tlinx.org |
| Message-ID: | <56551D13.10907@tlinx.org> |
| Date: | Tue, 24 Nov 2015 18:29:39 -0800 |
| From: | Linda Walsh <cygwin AT tlinx DOT org> |
| User-Agent: | Thunderbird |
| MIME-Version: | 1.0 |
| To: | cygwin AT cygwin DOT com |
| Subject: | Re: Symlink targets dereferenced when winsymlinks:native |
| References: | <564BAA1A DOT 8000703 AT gmail DOT com> <20151118175503 DOT GT6402 AT calimero DOT vinschen DOT de> |
| In-Reply-To: | <20151118175503.GT6402@calimero.vinschen.de> |
| X-IsSubscribed: | yes |
Corinna Vinschen wrote:
>> If it matters, the use case is `ln -sf /proc/self/fd /dev/fd`.
>
> It matters. This is a bug in Cygwin, a missing test in fact. It should
> never allow to create native symlinks to targets which only exist inside
> of Cygwin.
----
Please don't. Why? It would be a built-in behavior
difference between unix/linux symlinks and cygwin.
symlink create on unix/linux doesn't look at the 'source'
and create different types of links or different behaviors
based on some ill-considered 'pathname filtering'.
> Consider that /proc/self/fd has no meaning to non-Cygwin
> processes at all.
---
Unless you have a file-system driver, or a ".desktop.ini" in a
windows created 'C:\Proc\.desktop.ini that redirects handlers
for \proc to something similar. On my system, when I
look at /proc/self/fd in cygwin+windows:
cyg:
/> ll /proc/self/fd
total 0
lrwxrwxrwx 1 0 Nov 24 17:58 0 -> /dev/pty3
lrwxrwxrwx 1 0 Nov 24 17:58 1 -> /dev/pty3
lrwxrwxrwx 1 0 Nov 24 17:58 2 -> /dev/pty3
lrwxrwxrwx 1 0 Nov 24 17:58 3 -> /proc/21920/fd/
win:
/> cmd
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\>dir \proc\self\fd /w
dir \proc\self\fd /w
Volume in drive C is System Disk
Volume Serial Number is E889-68E4
Directory of C:\proc\self\fd
[.] [..]
0 File(s) 0 bytes
2 Dir(s) 401,855,094,784 bytes free
----
i.e. it shows a directory that is empty, and
according to windows, was created over a year ago:
C:\>dir |grep -i proc
dir |grep -i proc
01/23/2014 05:13 PM <DIR> proc
As soon as you start prohibiting normal 'native' link
creation based on some assumption about "who owns the
path", I can't see how that won't end up biting you later.
--
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
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |