This is the mail archive of the
cygwin
mailing list for the Cygwin project.
[1.7] old-style symlink handle leak
- From: Eric Blake <ebb9 at byu dot net>
- To: cygwin at cygwin dot com
- Date: Wed, 24 Dec 2008 15:58:02 +0000 (UTC)
- Subject: [1.7] old-style symlink handle leak
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.
--
Eric Blake
--
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/