https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118733
Enrico Zini <enrico at enricozini dot org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |enrico at enricozini dot org
--- Comment #5 from Enrico Zini <enrico at enricozini dot org> ---
Note that if the file does not exist at the beginning of weakly_canonical, it
does not throw but it's supposed to canonicalize the path according to a
specific algorithm.
It would be useful if the function reverted to that if the file disappears
during its execution.
As it is now, for most practical workloads weakly_canonical can only be called
in a wrapper that retries it if it throws.
I appreciate this is formally correct, though frustrately less useful that it
looks on its documentation.
I would find it useful if the documentation could be updated to document how
the caller would need to take responsibility of handling such type of race
conditions.