delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2005/11/13/17:44:50

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
Message-ID: <4377C1D9.4060703@t-online.de>
Date: Sun, 13 Nov 2005 23:44:41 +0100
From: Christian Franke <Christian DOT Franke AT t-online DOT de>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b) Gecko/20050217
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: setsid() does not call FreeConsole() even if all files are closed
References: <4377651F DOT 9050400 AT t-online DOT de> <20051113181422 DOT GA16538 AT trixie DOT casa DOT cgf DOT cx>
In-Reply-To: <20051113181422.GA16538@trixie.casa.cgf.cx>
X-ID: XjA9jGZpoeeaaI8ZlWjfM90K5lnmpQQUvlg+v4Nu+R5yYvMkr6tqkL
X-TOI-MSGID: 7f8259b4-25c7-4fff-baac-c3801df73ad2
X-IsSubscribed: yes

Christopher Faylor wrote:

> [...]
>
>The attached program demonstrates the assumption that only
>stdin/stdout/stderr are open when the program is started.  A shell could
>conceivably keep other fds open.
>
>Try applying the below patch to gain the behavior that you want.
>  
>

I had already tested a version which closes all descriptors closed and 
found no difference...

The problem was initially reported for smartd daemon in smartmontools 
Mailinglist.
As a quick workaround, I added FreeConsole() after setsid() to smartd.c


Christian


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