docs: Add a link to the Wikipedia page on TOCTTOU races

Try and make it a bit more obvious that g_file_query_exists() is
generally A Bad Idea.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
Reviewed-by: nobody
This commit is contained in:
Philip Withnall 2018-01-12 12:10:16 +00:00
parent 373bf178b6
commit d3b07453ab

View File

@ -1060,7 +1060,7 @@ g_file_enumerate_children_finish (GFile *file,
* Utility function to check if a particular file exists. This is
* implemented using g_file_query_info() and as such does blocking I/O.
*
* Note that in many cases it is racy to first check for file existence
* Note that in many cases it is [racy to first check for file existence](https://en.wikipedia.org/wiki/Time_of_check_to_time_of_use)
* and then execute something based on the outcome of that, because the
* file might have been created or removed in between the operations. The
* general approach to handling that is to not check, but just do the