[PATCH] PR libstdc++/83626 Don't throw for remove("") and remove_all("")

Jonathan Wakely jwakely@redhat.com
Fri Jan 5 10:37:00 GMT 2018


On 04/01/18 21:02 -0500, Tim Song wrote:
>What if the file to be removed is externally removed between the
>symlink_status and the ::remove call? This is probably QoI because
>filesystem race, but it seems reasonable to double check errno if
>::remove fails and not fail if the failure is due to the file not
>existing.

Yes, the race makes it undefined, but checking for ENOENT seems
reasonable. Thanks for the suggestion.



More information about the Gcc-patches mailing list