delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/12/27/18:29:09

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Message-Id: <3.0.5.32.20031227182809.0082b100@incoming.verizon.net>
X-Sender: vze1u1tg AT incoming DOT verizon DOT net
Date: Sat, 27 Dec 2003 18:28:09 -0500
To: cygwin AT cygwin DOT com
From: "Pierre A. Humblet" <Pierre DOT Humblet AT ieee DOT org>
Subject: Re: Please try the latest snapshot -- it is close to cygwin 1.5.6
In-Reply-To: <20031227174656.GA10264@redhat.com>
References: <3 DOT 0 DOT 5 DOT 32 DOT 20031226222751 DOT 00803100 AT incoming DOT verizon DOT net> <3 DOT 0 DOT 5 DOT 32 DOT 20031226211336 DOT 00804140 AT incoming DOT verizon DOT net> <20031226204641 DOT GA46362839 AT hpn5170x> <20031224152951 DOT GA34487383 AT hpn5170x> <20031223222816 DOT GA23935 AT redhat DOT com> <20031224152951 DOT GA34487383 AT hpn5170x> <3 DOT 0 DOT 5 DOT 32 DOT 20031224181524 DOT 007c21c0 AT incoming DOT verizon DOT net> <20031224232759 DOT GA12748 AT redhat DOT com> <20031226204641 DOT GA46362839 AT hpn5170x> <3 DOT 0 DOT 5 DOT 32 DOT 20031226211336 DOT 00804140 AT incoming DOT verizon DOT net> <3 DOT 0 DOT 5 DOT 32 DOT 20031226222751 DOT 00803100 AT incoming DOT verizon DOT net>
Mime-Version: 1.0

At 12:46 PM 12/27/2003 -0500, Christopher Faylor wrote:
>
>I missed the 'sh -c' clue in your previous message.  Since sh uses
>vfork, that indicates a vfork problem.  I've checked in some more
>changes to deal with this.  It seems to do the right thing both with sh
>-c and without.  It also should have the added benefit of doing the
>right thing wrt deallocating the console appropriately since open_fhs
>should now track the ctty usecount.  This was screwed up before,
>apparently even before I started mucking with the tty stuff.
>
>I sure do hate usage counting.
>
>cgf

Yes, that works fine now, as does bash -c inetd.

However when I launch inetd from an rxvt window running bash, or
from a Dos window running cygwin.bat with tty, I still see tty handles
in inetd.

CYGWIN_ME-4.90 hpn5170x 1.5.6(0.108/3/2) 2003-12-27 17:25 i686 unknown unknown Cygwin

I ran   strace -o trace rxvt -d :0 -e bash 
followed by inetd in the rxvt window.

The trace, available on http://mysite.verizon.net/phumblet/trace,
shows that the usecount is off by one. 

Correct run (bash -c inetd):
  159  220557 [main] inetd 34889607 setsid: sid 34889607, pgid 34889607, ctty -1, open_fhs 3
  168  220725 [main] inetd 34889607 fhandler_tty_slave::close: /dev/tty2 closed, decremented open_fhs 2, usecount 2

Incorrect run (under rxvt)
  167   88587 [main] inetd 34937947 setsid: sid 34937947, pgid 34937947, ctty -1, open_fhs 3
  159   88746 [main] inetd 34937947 fhandler_tty_slave::close: /dev/tty2 closed, decremented open_fhs 2, usecount 3


Pierre


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


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