X-Recipient: archive-cygwin@delorie.com
X-SWARE-Spam-Status: No, hits=-3.2 required=5.0 	tests=AWL,BAYES_00,J_CHICKENPOX_27,RCVD_IN_DNSWL_LOW,SPF_PASS
X-Spam-Check-By: sourceware.org
Message-ID: <4A82F82C.6000907@cwilson.fastmail.fm>
Date: Wed, 12 Aug 2009 13:13:16 -0400
From: Charles Wilson <cygwin@cwilson.fastmail.fm>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.8.1.22) Gecko/20090605 Thunderbird/2.0.0.22 Mnenhy/0.7.6.666
MIME-Version: 1.0
To: cygwin@cygwin.com
Subject: Re: [ANNOUNCEMENT] Updated: run-1.1.11-1
References: <200908101812.n7AICVXY019082@gridley.byu.edu> <4A8239BC.8080401@byu.net> <20090812134355.GB13438@calimero.vinschen.de>
In-Reply-To: <20090812134355.GB13438@calimero.vinschen.de>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
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

Corinna Vinschen wrote:

> I can confirm this.  It only happens with urxvt-X for some reason.
> I don't see this for xterm, or xeyes, or xclock.

Me too.

urxvt-X (and urxvtd-X) have their own hide-the-console code, taken from
inetd, as originally written by Corinna.

The core function is hide_console(), below.  (internally it uses
getConsoleHandle(), a local function that uses a number of different
approaches depending on the OS).

void hide_console ()
{
    HWND console = NULL;
    HANDLE hConsole;
    CONSOLE_SCREEN_BUFFER_INFO buffInfo;
    SECURITY_ATTRIBUTES  sa;

    sa.nLength = sizeof(sa);
    sa.bInheritHandle = TRUE;
    sa.lpSecurityDescriptor = NULL;
    hConsole = CreateFile( "CONOUT$",
                           GENERIC_WRITE | GENERIC_READ,
                           FILE_SHARE_READ | FILE_SHARE_WRITE,
                           &sa,
                           OPEN_EXISTING, 0, 0 );

    if (GetConsoleScreenBufferInfo(hConsole,&buffInfo) &&
        buffInfo.dwCursorPosition.X==0 &&
        buffInfo.dwCursorPosition.Y==0)
    {
        console = getConsoleHandle();
        if (console)
            ShowWindow (console, SW_HIDE);
    }
}

I think the *old* run's mechanism did not interfere with this, but the
new run's mechanism does.

I need another piece of information before deciding how to address this
issue. If someone can test urxvt-X *without* using run, on Windows 7 for
me, and report back, that'd be great.

You need to create a shortcut whose target is

C:\cygwin\bin\urxvt-X.exe -display 127.0.0.1:0.0 -ls -e /bin/bash --login

and launch that.  What I expect, is that there will be a quick flash
console window that disappears, and then the urxvt-X window shows up.
And no 100% CPU usage.

Thanks...

--
Chuck



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

