delorie.com/archives/browse.cgi | search |
X-Recipient: | archive-cygwin AT delorie DOT com |
X-Spam-Check-By: | sourceware.org |
Date: | Wed, 24 Dec 2008 11:36:23 -0500 |
From: | Christopher Faylor <cgf-use-the-mailinglist-please AT cygwin DOT com> |
To: | cygwin AT cygwin DOT com |
Subject: | Re: [1.7] old-style symlink handle leak |
Message-ID: | <20081224163623.GA15747@ednor.casa.cgf.cx> |
Reply-To: | cygwin AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
References: | <loom DOT 20081224T152703-183 AT post DOT gmane DOT org> |
MIME-Version: | 1.0 |
In-Reply-To: | <loom.20081224T152703-183@post.gmane.org> |
User-Agent: | Mutt/1.5.16 (2007-06-09) |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Id: | <cygwin.cygwin.com> |
List-Unsubscribe: | <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com> |
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 |
Note-from-DJ: | This may be spam |
On Wed, Dec 24, 2008 at 03:58:02PM +0000, Eric Blake wrote: >Process Explorer shows that cygwin is leaking handles to dangling old-style >symlink files during readdir. Here's a simple testcase: > >In cygwin 1.5: >$ mkdir /cygdrive/c/leak >$ ln -s nowhere linkfile > >In cygwin 1.7: >$ cd /cygdrive/c/leak >$ uname -a >CYGWIN_NT-5.1 EBLAKE 1.7.0(0.190/5/3) 2008-12-23 16:07 i686 Cygwin >$ echo * > >The glob forces bash to do a readdir, where it sees the old-style symlink >created by cygwin 1.5. Thereafter, bash owns a handle to >c:\leak\tmp\linkfile.lnk, because something in cygwin1.dll forgot to close it >out. Wow, nice catch. I'm not in a position to actually test this right now but it seems like there was an obvious bug in the symlink code which I think I've fixed. I'm building a snapshot now. If you are in a position of being able to test this when it finally shows up I'd appreciate hearing if my changes fixes the problem. cgf -- 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/
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |