delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2001/09/19/23:25:42

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
Message-ID: <008501c14183$d9eddc10$d2823bd5@dmitry>
From: "Dmitry Timoshkov" <dmitry AT baikal DOT ru>
To: <cygwin AT cygwin DOT com>
References: <077d01c1400e$2d92cdc0$d2823bd5 AT dmitry> <20010918101238 DOT H22900 AT cygbert DOT vinschen DOT de>
Subject: Re: fcntl(F_SETFD) on a file or socket handle
Date: Thu, 20 Sep 2001 12:24:06 +0900
MIME-Version: 1.0
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4522.1200
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200

"Corinna Vinschen" <cygwin AT cygwin DOT com> wrote:

[skipped]

> > I didn't investigate it further, and probably will not have time in the near
> > future to do so. Sorry.
> 
> :-(
> 
> You could at least send a testcase if you don't want to debug it.

Analyzing Cygwin code, it seems I have found the source of the problem (had no
time to confirm it running offending code though).

It's in the fhandler_base::set_inheritance() called from fhandler_base::set_close_on_exec().

DuplicateHandle()/CloseHandle() invalidates original system handle associated
with the Cygwin internal file descriptor (fd) while an operation on the fd is
possibly still in progress.

--
Dmitry.


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.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