From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 107109 invoked by alias); 27 Jul 2015 10:54:15 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 107097 invoked by uid 89); 27 Jul 2015 10:54:14 -0000 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: lb1-smtp-cloud6.xs4all.net Received: from lb1-smtp-cloud6.xs4all.net (HELO lb1-smtp-cloud6.xs4all.net) (194.109.24.24) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Mon, 27 Jul 2015 10:54:12 +0000 Received: from oude-webmail.xs4all.nl ([194.109.26.21]) by smtp-cloud6.xs4all.net with ESMTP id xNu91q00B0TK8Cq01Nu9eD; Mon, 27 Jul 2015 12:54:09 +0200 Received: from 83.162.234.136 (SquirrelMail authenticated user incog) by oude-webmail.xs4all.nl with HTTP; Mon, 27 Jul 2015 12:54:09 +0200 Message-ID: <994a85838723f326327975650e214a79.squirrel@oude-webmail.xs4all.nl> In-Reply-To: <4afa07869c07cd6a57441b221ca5fdf7.squirrel@oude-webmail.xs4all.nl> References: <63a08c60771faffa23bc1c029235301d.squirrel@oude-webmail.xs4all.nl> <55B22422.6000601@towo.net> <55B2B644.8010506@towo.net> <10d3a46960f8ec71784bdf15a0ee6b58.squirrel@oude-webmail.xs4all.nl> <1e17310bb0689632cd19fd7648bd9907.squirrel@oude-webmail.xs4all.nl> <55B5109A.4010700@towo.net> <4afa07869c07cd6a57441b221ca5fdf7.squirrel@oude-webmail.xs4all.nl> Date: Mon, 27 Jul 2015 10:54:00 -0000 Subject: Re: [ANNOUNCEMENT] Update: mintty 2.1.2 From: "Houder" To: cygwin@cygwin.com, "Thomas Wolff" 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 X-SW-Source: 2015-07/txt/msg00408.txt.bz2 > Hi Thomas, > > Let me rephrase/summarize my findings: > > Executing 'mintty -D' (i.e. v212) > > from a shortcut to bash (i.e. Cygwin console), > > will fork itself, where the child will turn itself into a session leader, as > desired. > > i.e. the following code will be executed: > > #if 1 // Thomas > if (daemonize && !isatty(0)) { // daemonize == true, !isatty(0) == true > if (fork() > 0) exit(0); > setsid(); // executed by child > } > #endif > > 1. if 'Windows Basic' has been selected (Personalization), the child will crash. > > 2. if 'Windows 7' has been selected (Personalization), the child will NOT crash, > ... and, eventually, fork itself, where the "grandchild" will replace itself > by bash in the end. Hi Thomas, I _may_ have found the cause of the problem ... (but all bets are off!). main() in winmain.c starts as follows: int main(int argc, char *argv[]) { main_argv = argv; main_argc = argc; // Henri: too early? #if 0 load_dwm_funcs(); #endif load_dwm_funcs() apparently "loads" a library, as follows: load_dwm_funcs load_sys_library("dwmapi.dll") LoadLibrary ... Will the library still be loaded in the child, I asked myself ... As an experiment, I moved the call to load_dwm_funcs() after fork/setsid. ... fork() ... setsid() // child continues ... // Henri: will dwmapi.dll still be loaded after the fork() call ????? #if 1 load_dwm_funcs(); #endif Still more testing is needed ... but I _may_ have found why mintty -D crashes. But I cannot explain why the crash does not occur when "eye candy" has been enabled. 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