delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin-developers/2001/08/23/04:35:58

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: Thu, 23 Aug 2001 10:35:44 +0200
From: Corinna Vinschen <vinschen AT redhat DOT com>
To: cygdev <cygwin-developers AT cygwin DOT com>
Subject: Re: rxvt pops up console with 2001-Aug-07 shapshot
Message-ID: <20010823103544.H20320@cygbert.vinschen.de>
Reply-To: cygdev <cygwin-developers AT cygwin DOT com>
Mail-Followup-To: cygdev <cygwin-developers AT cygwin DOT com>
References: <20010822132051 DOT L17561 AT cygbert DOT vinschen DOT de> <13659276735 DOT 20010822154753 AT logos-m DOT ru> <s1svgjgwaxt DOT fsf AT jaist DOT ac DOT jp> <13266469788 DOT 20010822174746 AT logos-m DOT ru> <s1su1z0w5sc DOT fsf AT jaist DOT ac DOT jp> <4268681989 DOT 20010822182438 AT logos-m DOT ru> <s1sbsl7hp0u DOT fsf AT jaist DOT ac DOT jp>
Mime-Version: 1.0
User-Agent: Mutt/1.2.5i
In-Reply-To: <s1sbsl7hp0u.fsf@jaist.ac.jp>; from fujieda@jaist.ac.jp on Thu, Aug 23, 2001 at 04:29:21AM +0900

On Thu, Aug 23, 2001 at 04:29:21AM +0900, Kazuhiro Fujieda wrote:
> >>> On Wed, 22 Aug 2001 18:24:38 +0400
> >>> egor duda <deo AT logos-m DOT ru> said:
> 
> > but i think if we change
> > FreeConsole() to ShowWindow (hConsole, SW_HIDE); it will look
> > identical on the screen. no?
> 
> No. FreeConsole() doesn't destroy the console window but detach
> the process from the window. It destroys the window only when
> there is no process attached with it.
> 
> When we execute sshd on bash, my patch detach sshd from the
> console window attached with bash. The window will remains until
> bash terminates.
> 
> I'm afraid that it would hide the window before bash terminates
> if we use ShowWindow(hConsole, SW_HIDE) instead of FreeConsole().

I have played around with the FreeConsole a bit and I found
that if we remove your patch from `setsid()' but let the
corresponding patch in `dtable::dec_console_fds()' we could
get the behaviour which seem to be expected:

- rxvt doesn't pop up cmd windows when starting e.g. `net start sshd'
- When starting /usr/sbin/sshd in a console window with CYGWIN=notty
  we can logout from that window and it actually is destroyed with
  sshd still running in the background.

Isn't that the compromise we're searching for or did I miss something?

I can't remove the `AllocConsole()' from inetd, though. I just
tried it again, hoping that Cygwin has changed the behaviour in
the meantime. Unfortunately, when I remove the AllocConsole()
call from inetd I'm again getting console windows resp. no output
from `net start ...' in the telnet window.

... or... wait... would it perhaps help if the AllocConsole isn't
used in inetd but in in.telnetd???

Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Developer                                mailto:cygwin AT cygwin DOT com
Red Hat, Inc.

- Raw text -


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