delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2004/01/16/15:05:55

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: <40084421.23DC049E@ieee.org>
Date: Fri, 16 Jan 2004 15:05:53 -0500
From: "Pierre A. Humblet" <Pierre DOT Humblet AT ieee DOT org>
Reply-To: Pierre DOT Humblet AT ieee DOT org
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: YA snapshot available [Re: new snapshot with some tty/WinMe fixes]
References: <20040103181903 DOT GA9424 AT redhat DOT com> <3 DOT 0 DOT 5 DOT 32 DOT 20040103181628 DOT 00835c70 AT incoming DOT verizon DOT net> <20040116183044 DOT GA24127 AT redhat DOT com>
Note-from-DJ: This may be spam


Christopher Faylor wrote:
> 
> On Sat, Jan 03, 2004 at 06:16:28PM -0500, Pierre A. Humblet wrote:
> >1) With the snapshot I can start cygwin programs fine and I have not
> >observed any popup.
> 
> I haven't seen a popup in Windows Me for some time with the latest
> snapshot and I've been able to configure/make cygwin under ME with no
> problem.
> 
> >2) The regression repeated before (see original mail for more details)
> >is still there: "However when using sh, setsid sh -c "echo hello >
> >/dev/tty1; /bin/sleep 10; /bin/echo there > /dev/tty" sh and the final
> >echo hang forever (with echo in the "O" state in ps), and sh cannot be
> >terminated with kill (OK from the task manager)."
> 
> This should be ok now.
> 
> >3) There is another regression that I had also observed with the
> >previous snapshot, but after sending my previous message: the Console
> >is not properly freed after setsid when CYGWIN=notty.  Programs such as
> >inetd do not go in the background when starting from a command.com
> >window or from the Windows "run" menu.  Things are fine with CYGWIN=tty
> 
> This also should be working now.
> 
> >By the way, I don't understand why open_fhs is modified in the slave
> >tty and ctty code.  The only purpose I see in open_fhs is to free the
> >console at the right time.  Why should the presence of a slave tty,
> >possibly connected to an entirely different console window, impact on
> >the local console?  (this is not a new issue).
> 
> I was hoping that Corinna would chime in here but maybe she isn't
> following this discussion.  IIRC, I resisted adding the open_fhs checks
> to the pty/tty handling early on but eventually was convinced that they
> were needed.  Previously, it was pretty hard to have a program with
> handles to more than one console but, with the existence of the "new"
> windows station stuff it is conceivable, if unlikely that a program
> could have two open.  In that context the open_fhs stuff is being
> overused, but that was part of the motivation for implementing the new
> archetype stuff in the DLL -- then I can eventually get rid of the
> open_fhs stuff in favor of setting up console archetypes.  There is
> still a lot of genericizing to do to accommodate that but it is a future
> goal.

Thanks Chris.

I have run into problem with another test, running from cmd.exe.

H:\>set CYGWIN
CYGWIN=tty

H:\>uname -a
CYGWIN_NT-4.0 xxx 1.5.6s(0.108/3/2) 20040116 13:48:00 i686 unknown unknown Cygwin

H:\>cat try_forksetsid.c
#include <unistd.h>
#include <signal.h>

main()
{
    signal(SIGHUP, SIG_IGN);
    close(0);
    close(1);
    close(2);
    if (!fork()) {
//      setsid();
        sleep(10);
    }
}

H:\>gcc try_forksetsid.c

H:\>sh -c "./a"
waiting for children using tty0 to terminate
waiting for children using tty0 to terminate

It's motivated by a weirdness I saw last night with exim, 
where the setsid() is present.

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