delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2025/01/07/03:03:48

DMARC-Filter: OpenDMARC Filter v1.4.2 delorie.com 50783mwK240814
Authentication-Results: delorie.com; dmarc=pass (p=none dis=none) header.from=cygwin.com
Authentication-Results: delorie.com; spf=pass smtp.mailfrom=cygwin.com
DKIM-Filter: OpenDKIM Filter v2.11.0 delorie.com 50783mwK240814
Authentication-Results: delorie.com;
dkim=pass (1024-bit key, unprotected) header.d=cygwin.com header.i=@cygwin.com header.a=rsa-sha256 header.s=default header.b=RF8muh6J
X-Recipient: archive-cygwin AT delorie DOT com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DCD5A3858C32
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
s=default; t=1736237026;
bh=WAp8ZMNkIX5CsxejL8wWpkyfZMV723Ba0a/o+j+qcYY=;
h=Date:Subject:To:References:In-Reply-To:List-Id:List-Unsubscribe:
List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:
From;
b=RF8muh6JyEWyEUC47jZ0k6T71tFWbLMKBNDGrXH5aLq6MC6hwtMWMAYuHltTTyqL5
NCKWWgj2DlJl8pACN87jl0c2/+lOBPnHZQIEClvO1mmf90XTcJwV0AyWt9eAssXX/h
4qF8jj3Q4OyKbrHDPIZakVbvEEtmRdtx8nK9EDN4=
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 1E50F3858C51
ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 1E50F3858C51
ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1736236928; cv=none;
b=IbQuX39VMvrGl1t5hbkbWq0W0oAvPGU3j58nZvfyfCZArQAxVomSKOT9CsC3hNVB+kWavySA1renGFdKVteLNsfphnpBQbsuNl/OeNyfuIRRHFot4v4VsABWsdFQpCcN9FozlP+6PvKjifxOzYNVqu+4mxQkK3INMD4w9+m/feI=
ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key;
t=1736236928; c=relaxed/simple;
bh=wkDs8rcSFFpGGlaqHBit4Bh1MITeTvOoNkHFJx9JL8g=;
h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:From:To;
b=EaSjD1ITm01NJ8V2YAktuLaCb3jP4HlHpCBwps6tp0Tahn3sg/a6XwBxTtQ7KUrcn2HeyGhPtmVBVscW3LpAKwDEfKGQP9CjtPSotK4yrQAsKNrOdABuShdZrfvqbaY//EtSccMsEBocQvFfuAfQT6yyEZCr8a4OdwXxGMO4BlI=
ARC-Authentication-Results: i=1; server2.sourceware.org
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1E50F3858C51
Message-ID: <b6d540e2-87fd-49e2-9de8-19ef685d36ad@kircheis.it>
Date: Tue, 7 Jan 2025 09:02:02 +0100
MIME-Version: 1.0
Subject: Re: env and PATH
To: cygwin AT cygwin DOT com
References: <77a3709d-ec4d-497b-bf6c-75f29dc8c992 AT kircheis DOT it>
<1756102695 DOT 20250104044139 AT yandex DOT ru>
<21a99c98-1a16-4ffb-97f4-fa9480f7b02d AT kircheis DOT it>
<383539154 DOT 20250104231316 AT yandex DOT ru>
<dfce0589-5f52-408c-a8f9-f42771c724a3 AT kircheis DOT it>
In-Reply-To: <dfce0589-5f52-408c-a8f9-f42771c724a3@kircheis.it>
X-Rspamd-Queue-Id: 4YS3Rc0XLzz9t1j
X-BeenThere: cygwin AT cygwin DOT com
X-Mailman-Version: 2.1.30
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-request AT cygwin DOT com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=subscribe>
From: Federico Kircheis via Cygwin <cygwin AT cygwin DOT com>
Reply-To: Federico Kircheis <federico AT kircheis DOT it>
Sender: "Cygwin" <cygwin-bounces~archive-cygwin=delorie DOT com AT cygwin DOT com>

>>> Iterating and invoking an external program (cygpath) for every path 
>>> takes some time.
>>
>> Depends on actual use case, it may be just a single invocation for entire
>> list.
> 
> I'm currently not on Windows, you mean it is possible to convert
> 
> C:\Windows;C:\Windows\system32;
> 
> to
> 
> /cygdrive/c/windows:/cygdrive/c/windows/system32
> 
> (or equivalent with /proc) with one invocation of cygpath?
> 
> If that is the option --path (just read from the documentation, I did 
> not notice it before, and did not try it, I will do it in the next days) 
> then I suppose the performance issue I mentioned would be a non-issue. 
> Although I would still have preferred to be able to tell env to use the 
> variable as-is, just like all the others.

Confirmed, with --path it is possible to convert the Windows PATH to a 
cygwin PATH, that then gets converted to a Windows PATH again when 
invoking a Windows program.

One binary call is obviously much faster than iterating every element in 
PATH and converting them one by one, which makes it a viable solution.

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

- Raw text -


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