X-Recipient: archive-cygwin@delorie.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:from:to:subject:date:message-id:references
	:in-reply-to:content-type:mime-version
	:content-transfer-encoding; q=dns; s=default; b=LT1+svtUp/npW8t5
	o0w69ccgQomP8ZhTypuUt27xtgMImVevljYh0X4V6n8We5HBoEM9GQlbeMuSCCpV
	BR0dRHgVWJsFZ3Ih8+V7AJPaS6P171YvZKdCCl7wpqgxdaW8cWHWUvG7wVAl9k4w
	7mQzdBMFdYRC8A560ikYgqYibuE=
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:from:to:subject:date:message-id:references
	:in-reply-to:content-type:mime-version
	:content-transfer-encoding; s=default; bh=U4CfldZ/bHKIyfLv2G+0Ec
	wDksg=; b=hL2iFNP8I3M1fnQdJPX1sTdzKVGlU9+4ke/O8NXhf2/rGzWMhjI4lQ
	epfx17Ky4r2ftKOQjojtrSr63aHyfDh8A/q8EPZGpZ1GWXzCVR9Jscc8t5Y+se+z
	EBgWLNWbQQziSPBvFCk95TDXKryQum/m6SqJGUYAyipSyChB17W/o=
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=-0.9 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY autolearn=no version=3.3.2 spammy=preferably, dear, states, Tel
X-HELO: mga14.intel.com
X-Amp-Result: SKIPPED(no attachment in message)
X-Amp-File-Uploaded: False
X-ExtLoop1: 1
From: "Soegtrop, Michael" <michael.soegtrop@intel.com>
To: "cygwin@cygwin.com" <cygwin@cygwin.com>
Subject: RE: Unexpected behavior of ~ when calling bash from a different cygwin installation
Date: Sat, 16 Jun 2018 08:11:28 +0000
Message-ID: <0F7D3B1B3C4B894D824F5B822E3E5A17788010BF@IRSMSX102.ger.corp.intel.com>
References: <0F7D3B1B3C4B894D824F5B822E3E5A1778800706@IRSMSX102.ger.corp.intel.com>   <0F7D3B1B3C4B894D824F5B822E3E5A177880079D@IRSMSX102.ger.corp.intel.com> <1307619899.20180616023803@yandex.ru>
In-Reply-To: <1307619899.20180616023803@yandex.ru>
x-ctpclassification: CTP_NT
x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiYzgyMGM5ZGYtNmVjNi00NjU1LWFlZmQtM2E5MDI4ZTZlMmQ5IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiZGlHNlhsU24rakFHNDhRdExzVUthY2dCQ0lRemZkTHZpR2xVUlpRUDJZeklpWmJnc3BscW5CSjU1anZmZmV2cSJ9
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
X-IsSubscribed: yes
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id w5G8ETRJ016223

Dear Andrey,

> The mapping is consistent throughout the execution tree.

I would like to understand the underlying mechanism. The documentation (FAQ section 4.20) states (as far as I understand) that the Windows path of the Cygwin system root an executable sees is the parent directory of the folder in which the cygwin1.dll resides which is loaded by an executable. As I showed, this doesn't seem to be the case. How does it work then? How is the system root folder passed from parent to child?

> At best, nothing will work

Actually if I put cmd in between and clear a few environment variables it works very well in fairly complicated scenarios. Still I would like to understand how the underlying mechanisms work (preferably without reverse engineering).

Best regards,

Michael
Intel Deutschland GmbH
Registered Address: Am Campeon 10-12, 85579 Neubiberg, Germany
Tel: +49 89 99 8853-0, www.intel.de
Managing Directors: Christin Eisenschmid, Christian Lamprechter
Chairperson of the Supervisory Board: Nicole Lau
Registered Office: Munich
Commercial Register: Amtsgericht Muenchen HRB 186928


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


