From: Corinna Vinschen <corinna-cygwin@cygwin.com>
To: cygwin-apps@cygwin.com
Subject: Re: [Bug] setup.exe
Date: Mon, 18 Nov 2013 10:06:00 -0000 [thread overview]
Message-ID: <20131118100616.GA12830@calimero.vinschen.de> (raw)
In-Reply-To: <87k3g6x5pg.fsf@Rainer.invalid>
[-- Attachment #1: Type: text/plain, Size: 1627 bytes --]
On Nov 17 19:07, Achim Gratz wrote:
>
> No good deed goes unpunished… the latest changes to setup.exe to use the
> UNC path interfaces break set_cout. This function is only used in
> unattended mode and when the help option is used and setup.exe works
> correctly when this function does not get called.
>
> The reason for the breakage is the special filename "conout$" that is
> used to attach to the console output handle and the override to fopen
> that then treats it like any other file name and makes a UNC path
> "\\?\conout$" from it.
Thanks for tracking this down.
> If I remove the override for fopen, things are
> working again, but I can't find how to specify "conout$" via a UNC path
> and simply setting the string back to "conout$" in the attr structure in
> gdb didn't work, either.
It's impossible prior to Windows 8. In the days before Windows 8, the
console handle was always a fake handle, entirely handled within the
Win32 kernel32.dll. Each access to a console handle got redirected
to calling a CrsXXX functions which calls CSRSS via LPC. Windows 8
finally introduced a native Console device called \Device\ConDrv so
consoles became real OS objects.
Having said that, this set_cout function is a real bummer. The easiest
way to fix this problem is to rename fopen to nt_fopen (analoge to
nt_wfopen) and to change all explicit fopen calls to nt_fopen calls.
I'll do that in a minute.
Thanks again,
Corinna
--
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Maintainer cygwin AT cygwin DOT com
Red Hat
[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]
next prev parent reply other threads:[~2013-11-18 10:06 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-17 18:07 Achim Gratz
2013-11-18 10:06 ` Corinna Vinschen [this message]
2013-11-18 19:51 ` Achim Gratz
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=20131118100616.GA12830@calimero.vinschen.de \
--to=corinna-cygwin@cygwin.com \
--cc=cygwin-apps@cygwin.com \
/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).