This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: [ANNOUNCEMENT] Update: mintty 2.1.2
- From: "Houder" <houder at xs4all dot nl>
- To: cygwin at cygwin dot com, "Thomas Wolff" <towo at towo dot net>
- Date: Mon, 27 Jul 2015 12:54:09 +0200
- Subject: Re: [ANNOUNCEMENT] Update: mintty 2.1.2
- Authentication-results: sourceware.org; auth=none
- References: <announce dot 55B1677D dot 5080303 at towo dot net> <63a08c60771faffa23bc1c029235301d dot squirrel at oude-webmail dot xs4all dot nl> <55B22422 dot 6000601 at towo dot net> <d9ef810e0ad325a9b51f641a10a06f0b dot squirrel at oude-webmail dot xs4all dot nl> <55B2B644 dot 8010506 at towo dot net> <be0351be5e3aa7b7ba980fc25f9cce0c dot squirrel at oude-webmail dot xs4all dot nl> <e731c3536912df8739a630e17ab5d8ec dot squirrel at oude-webmail dot xs4all dot nl> <10d3a46960f8ec71784bdf15a0ee6b58 dot squirrel at oude-webmail dot xs4all dot nl> <1e17310bb0689632cd19fd7648bd9907 dot squirrel at oude-webmail dot xs4all dot nl> <55B5109A dot 4010700 at towo dot net> <4afa07869c07cd6a57441b221ca5fdf7 dot squirrel at oude-webmail dot xs4all dot nl>
> 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