delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin-developers/2001/08/22/07:50:02

Mailing-List: contact cygwin-developers-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-developers-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin-developers/>
List-Post: <mailto:cygwin-developers AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-developers-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-developers-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin-developers AT sources DOT redhat DOT com
Date: Wed, 22 Aug 2001 15:47:53 +0400
From: egor duda <deo AT logos-m DOT ru>
X-Mailer: The Bat! (v1.53 RC/4)
Reply-To: egor duda <cygwin-developers AT cygwin DOT com>
Organization: deo
X-Priority: 3 (Normal)
Message-ID: <13659276735.20010822154753@logos-m.ru>
To: cygdev <cygwin-developers AT cygwin DOT com>
Subject: Re: rxvt pops up console with 2001-Aug-07 shapshot
In-Reply-To: <20010822132051.L17561@cygbert.vinschen.de>
References: <20010814140130 DOT A26049 AT redhat DOT com>
<20010815125949 DOT A768 AT dothill DOT com> <20010816010713 DOT A26439 AT redhat DOT com>
<20010821222132 DOT A27443 AT redhat DOT com> <s1s1ym4y57g DOT fsf AT jaist DOT ac DOT jp>
<20010822091749 DOT I17561 AT cygbert DOT vinschen DOT de> <s1szo8swmlu DOT fsf AT jaist DOT ac DOT jp>
<16746690287 DOT 20010822121806 AT logos-m DOT ru>
<20010822132051 DOT L17561 AT cygbert DOT vinschen DOT de>
MIME-Version: 1.0

Hi!

Wednesday, 22 August, 2001 Corinna Vinschen vinschen AT redhat DOT com wrote:

CV> On Wed, Aug 22, 2001 at 12:18:06PM +0400, egor duda wrote:
>> i use this simple program in such cases.
>> 
>> #include <windows.h>
>> 
>> #define TITLESIZE 1024
>> 
>> int
>> main (int argc, char** argv)
>> {
>>   HWND console;
>>   char old_title [TITLESIZE];
>>   char new_title [TITLESIZE];
>>   if (!GetConsoleTitle (old_title, TITLESIZE))
>>     return 1;
>>   sprintf (new_title, "cygwin.hide.%d", GetCurrentProcessId ());
>>   SetConsoleTitle (new_title);
>>   Sleep (40);
>>   console = FindWindow (NULL, new_title);
>>   SetConsoleTitle (old_title);
>>   ShowWindow (console, SW_HIDE);
>> }

CV> So you don't destroy the window but simply hide it, right?

yes. if i understood Kazuhiro correctly, he was annoyed with the
window showing at his desktop. at least, i was :), that's why i wrote
it.

>> KF> I think inetd and cygrunsrv shouldn't invoke AllocConsole() and
>> KF> the problem with windows popping up should be solved by Egor's
>> KF> ttyfier.
>> 
>> ttyfier is designed to run interactive applications. if you want to
>> run, say, 'net start some_service', which creates new console in case
>> it's not available, it's fine. but if you'll run it with redirected
>> output, e.g 'tfy net start some_service >> service.log', you won't see
>> in service.log what you should normally expect.

CV> I don't understand what ttyfier has to do with that problem. Please
CV> enlighten me!

frankly, i don't know if ttyfier can help with the problems Kazuhiro
encountered. ttyfier calls CreateProcess() with separate new console,
and it it creates it with child's console window hidden. so, in case
of Kazuhiro, he can normally run everything either from service or from
normal interactive session -- he won't have unneeded console window
shown up on his desktop.

but my point is that ttyfier was designed for somewhat different
purposes, i.e. for running interactive native apps, and have its own
limitations. So, hiding annoying window from the desktop can be done
with simpler program.

Egor.            mailto:deo AT logos-m DOT ru ICQ 5165414 FidoNet 2:5020/496.19

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019