This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/15539] New: nftw with FTW_HDIR doesn't restore cwd upon cancellation
- From: "aoliva at sourceware dot org" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Sun, 26 May 2013 16:43:20 +0000
- Subject: [Bug libc/15539] New: nftw with FTW_HDIR doesn't restore cwd upon cancellation
- Auto-submitted: auto-generated
http://sourceware.org/bugzilla/show_bug.cgi?id=15539
Bug ID: 15539
Summary: nftw with FTW_HDIR doesn't restore cwd upon
cancellation
Product: glibc
Version: 2.18
Status: NEW
Severity: normal
Priority: P2
Component: libc
Assignee: unassigned at sourceware dot org
Reporter: aoliva at sourceware dot org
CC: drepper.fsp at gmail dot com
Various resources can be leaked by ftw because it has no cleanup handler to
release allocated memory in case of thread cancellation. Leaking memory and
file descriptors is unfortunate, but not always a show-stopper, but changing
the current working directory and not restoring it at the end feels a bit more
serious to me. I'm not sure nftw is ever called with FTW_CHDIR in
multi-threaded programs, but I thought I'd report this issue so that it can be
discussed and, if found relevant, fixed.
A related issue is that, if the final fchdir/chdir fails, no indication of the
problem is passed to back to the caller.
--
You are receiving this mail because:
You are on the CC list for the bug.