From: "Houder" <houder@xs4all.nl>
To: cygwin@cygwin.com, "Thomas Wolff" <towo@towo.net>
Subject: Re: [ANNOUNCEMENT] Update: mintty 2.1.2
Date: Mon, 27 Jul 2015 10:54:00 -0000 [thread overview]
Message-ID: <994a85838723f326327975650e214a79.squirrel@oude-webmail.xs4all.nl> (raw)
In-Reply-To: <4afa07869c07cd6a57441b221ca5fdf7.squirrel@oude-webmail.xs4all.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
next prev parent reply other threads:[~2015-07-27 10:54 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-23 22:41 Thomas Wolff
2015-07-24 7:50 ` Houder
2015-07-24 11:40 ` Thomas Wolff
2015-07-24 13:18 ` Houder
2015-07-24 13:25 ` Houder
2015-07-24 13:34 ` Corinna Vinschen
2015-07-24 22:03 ` Thomas Wolff
2015-07-25 17:03 ` Houder
2015-07-25 20:15 ` Houder
2015-07-26 11:09 ` Houder
2015-07-26 11:58 ` Houder
2015-07-26 16:53 ` Thomas Wolff
2015-07-26 22:59 ` Houder
2015-07-27 10:54 ` Houder [this message]
2015-07-27 15:58 ` Houder
2015-07-27 17:44 ` Thomas Wolff
2015-07-27 19:29 ` Corinna Vinschen
2015-07-27 20:44 ` Houder
2015-07-27 20:58 ` Houder
2015-07-27 20:59 ` Corinna Vinschen
2015-07-27 21:14 ` Houder
2015-07-27 7:17 ` Csaba Raduly
2015-07-27 8:50 ` Houder
2015-07-24 13:25 ` Corinna Vinschen
2015-07-27 18:08 ` Buchbinder, Barry (NIH/NIAID) [E]
2015-07-27 22:01 ` Thomas Wolff
2015-07-30 12:00 ` Kptain
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=994a85838723f326327975650e214a79.squirrel@oude-webmail.xs4all.nl \
--to=houder@xs4all.nl \
--cc=cygwin@cygwin.com \
--cc=towo@towo.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).