delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2015/02/10/14:44:38

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=HKv0TmcWT+1x1b45YnmykzjyVa4V/N/GlM+769tdyWT
OYPjinsxfIKwgRP4uKk2AD/qEWAxmsNT8rUtReObyu2PQZEBux6t21PqY7t9GQB2
eAz6an/OgGTlRTPJnbNPPyA6njtQiqKrc2nT3cYB6ItLhyTpztaylT9JIajL1V88
=
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=F8PfbOBjaOIhWfS+raC3PJuihU4=; b=GeBTVjFxbJwnvplW8
FF5ZIxlwWLD4/W4NoLb7iXSDu8U9aTXfjLUHuA0tbdyIdyLyKuqiXgOL3OkzB1tW
7zistdP8do7eY0Zmnr3j7gYC/4xCJNKLmZNXAXCcv0nyC0dqBvreL9gFgtELWoP+
8B5FjaCHcnh40+Ochp086C7KBY=
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=3.6 required=5.0 tests=AWL,BAYES_50,FOREIGN_BODY,RCVD_IN_DNSWL_NONE autolearn=no version=3.3.2
X-HELO: mout.kundenserver.de
Message-ID: <54DA5890.8060609@towo.net>
Date: Tue, 10 Feb 2015 20:14:24 +0100
From: Thomas Wolff <towo AT towo DOT net>
User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:31.0) Gecko/20100101 Thunderbird/31.4.0
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: execlp/execvp needs case-correct PATH
References: <54D7EB8E DOT 8070308 AT towo DOT net> <20150209101747 DOT GA12131 AT calimero DOT vinschen DOT de> <54D91D54 DOT 5000705 AT towo DOT net> <20150210092756 DOT GC15989 AT calimero DOT vinschen DOT de>
In-Reply-To: <20150210092756.GC15989@calimero.vinschen.de>
X-TagToolbar-Keys: D20150210201424263
X-UI-Out-Filterresults: notjunk:1;
X-IsSubscribed: yes

Am 10.02.2015 um 10:27 schrieb Corinna Vinschen:
> On Feb  9 21:49, Thomas Wolff wrote:
>> Am 09.02.2015 um 11:17 schrieb Corinna Vinschen:
>>> On Feb  9 00:04, Thomas Wolff wrote:
>>>> With a Windows case sensitive file system (and according mount flags
>>>> for /cygdrive), the PATH does not properly reflect casing of the actual
>>>> directories (e.g. C:\WINDOWS vs. C:\Windows, thanks MS...).
>>>> However, the shell finds programs anyway, like e.g. notepad.
>>>> The exec*p system calls, on the other hand, do not find a program in this
>>>> case as demonstrated by the attached test program.
>>>> This is in contrast to the Linux (and POSIX?) manual page which claims
>>>> „The execlp(), execvp(), and execvpe() functions duplicate the actions
>>>> of the shell in searching for an executable file …“
>>> ...
>> Sorry, I forgot one detail: I added /cygdrive/c/Windows/System32 to my path
>> so the shell will find it, but yet execlp does not find it.
> Which makes sense, given that notepad is not in C:\Windows\System32, but in C:\Windows.
On my systems (Windows 7 Professional/Ultimate) it’s in both C:\Windows 
and C:\Windows\System32
(otherwise the shell wouldn’t have found it after adding to the path).

However, I could resolve the issue partly by putting
/cygdrive/c/Windows (or ../System32) in the path *before* the bogus
/cygdrive/c/WINDOWS - weird, but this way exec*p works.

With the old setting (bogus first in path), apparently/assumedly exec*p 
somehow finds the file in /cygdrive/c/WINDOWS but then cannot start it 
from there because of the case mis-match.
There’s still the inconsistency with shell behaviour.

------
Thomas

---
Diese E-Mail wurde von Avast Antivirus-Software auf Viren geprüft.
http://www.avast.com


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

- Raw text -


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