Boost logo

Boost :

From: Beman Dawes (bdawes_at_[hidden])
Date: 2002-08-18 08:34:05


At 12:31 PM 8/17/2002, Thomas Witt wrote:

>When a directory iterator is used to fully traverse a directory
find_close
>is called twice with the same handle. The resulting API call does not
>return on Linux/Win2k.
>
>The problem is that find_next_file calls find_close without resetting
>handle to BOOST_INVALID_HANDLE_VALUE. I do not fully understand why
>find_next_file has to call find_close. IIUC this would be handled in
>the directory_iterator dtor anyway?

This sounds very similar to a bug already fixed. Either there was a
regression to the original bug, or the fix was incomplete.

Is this being detected by operations_test.cpp? If not, I'd like to know
the test case so I can add it.

As to why find_next_file is so eager to call find_close, the only rationale
I can think of right now is that on some OS's handles are at a premium, and
should be closed ASAP.

--Beman


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk