delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2005/11/13/19:11:02

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/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
Date: Sun, 13 Nov 2005 19:10:50 -0500 (EST)
From: Igor Pechtchanski <pechtcha AT cs DOT nyu DOT edu>
Reply-To: cygwin AT cygwin DOT com
To: Christian Franke <Christian DOT Franke AT t-online DOT de>
cc: cygwin AT cygwin DOT com
Subject: Re: setsid() does not call FreeConsole() even if all files are closed
In-Reply-To: <4377C3A7.9040703@t-online.de>
Message-ID: <Pine.GSO.4.63.0511131902390.21239@slinky.cs.nyu.edu>
References: <4377651F DOT 9050400 AT t-online DOT de> <Pine DOT GSO DOT 4 DOT 63 DOT 0511131602070 DOT 21239 AT slinky DOT cs DOT nyu DOT edu> <4377C3A7 DOT 9040703 AT t-online DOT de>
MIME-Version: 1.0

On Sun, 13 Nov 2005, Christian Franke wrote:

> Igor Pechtchanski wrote:
>
> > [...]
> >
> > Yep, so, as CGF noted, try
> >
> > $ /usr/sbin/syslogd >/dev/null 2>&1 </dev/null
> > $ exit
>
> That makes no difference. Shell exits but console window persists (at
> least on XP SP2) until syslogd is terminated.
>
> Did you get a different result?

No, I actually was able to reproduce your result without using syslogd:

$ setsid sleep 10 >/dev/null 2>&1 </dev/null
$ exit

(shell prints "logout", but window remains until sleep is over).

In fact, closing the file descriptors doesn't work either:

$ setsid sleep 10 >&- 2>&- <&-
$ exit

(same result).
I've generated the strace for the above cases, and will take a deeper look
when time permits.
	Igor
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_		pechtcha AT cs DOT nyu DOT edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor AT watson DOT ibm DOT com
     |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski, Ph.D.
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

If there's any real truth it's that the entire multidimensional infinity
of the Universe is almost certainly being run by a bunch of maniacs. /DA

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