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:message-id:in-reply-to:references:date:subject
	:from:to:mime-version:content-type:content-transfer-encoding; q=
	dns; s=default; b=iuP/ADA9OXjNk01WjC0buN4s/q2Ga03ORWz33weT7ET1J8
	YCWlF8+X8YtxticaM3H6woQJ7lpOQ8SiHdtsRJ4YcGZrBdkeEs4ppK/Y8Ay8f88B
	0LsVIZJIGQxo5Jl6IisRr2h3tBQxenssZaeEzHZGU+LgAbhseYkZcRLjRgvd4=
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:in-reply-to:references:date:subject
	:from:to:mime-version:content-type:content-transfer-encoding; s=
	default; bh=DyIYA+jOz/tg3Ckk3KWGfCsj4fw=; b=BIFS6KG/JUYpZR3J5IVH
	HbXrAMThk9PKNOBVNuNd4pOM1ebxujxAvkz77ccvjrVJZTa8Zma94OVrCmdnqMpP
	UWb8WQegFPYc0YkFSR4buFj5VHI8cJeH3ILLWgypt/nQRbn2ZaejFIUaMCjjrK3U
	jghVXL9/U3qjAtvaCutrrSo=
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=-1.3 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2
X-HELO: lb2-smtp-cloud6.xs4all.net
Message-ID: <c0b154daf39328f95aa143785533482b.squirrel@oude-webmail.xs4all.nl>
In-Reply-To: <20150727205928.GA15452@calimero.vinschen.de>
References:    <e731c3536912df8739a630e17ab5d8ec.squirrel@oude-webmail.xs4all.nl>    <10d3a46960f8ec71784bdf15a0ee6b58.squirrel@oude-webmail.xs4all.nl>    <1e17310bb0689632cd19fd7648bd9907.squirrel@oude-webmail.xs4all.nl>    <55B5109A.4010700@towo.net>    <4afa07869c07cd6a57441b221ca5fdf7.squirrel@oude-webmail.xs4all.nl>    <994a85838723f326327975650e214a79.squirrel@oude-webmail.xs4all.nl>    <20bcab2c7a6ca2aa1990f8a421b674ae.squirrel@oude-webmail.xs4all.nl>    <55B66DE5.40104@towo.net> <20150727192935.GA12449@calimero.vinschen.de>    <8ee33951118ac7ed81bb3a20e658950c.squirrel@oude-webmail.xs4all.nl>    <20150727205928.GA15452@calimero.vinschen.de>
Date: Mon, 27 Jul 2015 23:14:02 +0200
Subject: Re: [ANNOUNCEMENT] Update: mintty 2.1.2
From: "Houder" <houder@xs4all.nl>
To: cygwin@cygwin.com
User-Agent: SquirrelMail/1.4.22
MIME-Version: 1.0
Content-Type: text/plain;charset=iso-8859-1
Content-Transfer-Encoding: 8bit
X-IsSubscribed: yes

> On Jul 27 22:44, Houder wrote:
>> > On Jul 27 19:44, Thomas Wolff wrote:
>> >> Am 27.07.2015 um 17:58 schrieb Houder:
>> >> >Hi Thomas,
>> >> >
>> >> >Moving load_dwm_funcs() did the trick ...
>> >> >
>> >> >
>> >> Thanks again for your analysis.
>> >> In Control Panel â Performance Information and Tools â Adjust visual
>> >> effects,
>> >> it is only the last of the flags, â Use visual styles on windows and
>> >> buttons,
>> >> that makes the difference; if deselected, mintty crashes if called from a
>> >> console or somehow doubly isolated by
>> >> (setsid mintty &).
>> >>
>> >> Apparently, LoadLibrary does not propagate to a forked thread;
>> >
>> > Forked process, I hope :)
>> >
>> > No, it doesn't.  Loading a library is purly process lokal on Windows.
>> > Cygwin DLLs(*) have special startup code which allows to register them
>> > in the process and to re-load them in the child process at fork time.
>> >
>> > (*) Actually, any DLL using this special entry point would work.
>> >     Native Windows DLLs just don't, usually :}
>>
>> Ha, Corinna, you are the expert here, of course :-)
>>
>> >From MSDN I learned (LoadLibrary() ):
>>
>>     "Module handles are not global or inheritable. A call to LoadLibrary by one
>>      process does not produce a handle that another process can use in calling
>>      GetProcAddress (as an example). The other process must make its OWN call to
>>      LoadLibrary for the module before calling GetProcAddress"
>>
>> Well, ok, alright, that makes sense ...
>>
>> However, if pDwmIsCompositionEnabled() returns 1, which will be the case if one
>> has selected 'Windows 7' i.s.o. 'Windows Basic' (Personalization),
>>
>>     as an example ...
>>
>> it turned out to be possible to invoke load_dwm_funcs() (i.e. LoadLibrary() )
>> before the fork to a child withOUT a crash of the child !!!!!
>>
>>     After all, it is Windows ?????
>
> What if the DLL is preloaded into processes with certain settings, e.g.
> by some other Windows DLL?  LoadLibrary won't indicate if the DLL has
> been loaded by this call or earlier.

Sigh ... you got me, I am not familiar with Windows ... Anything can happen
under the hood, and I will not know.

I only know, that dwmapi.dll is the only .dll that is loaded by mintty at
run time ... and that is was required to happen after the fork in my case.

(my case being: 'Windows Basic' (Personalization) )

Henri


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

