From d3b07453ab0043797bbef4591bdc2b955a390b00 Mon Sep 17 00:00:00 2001 From: Philip Withnall Date: Fri, 12 Jan 2018 12:10:16 +0000 Subject: [PATCH] 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 Reviewed-by: nobody --- gio/gfile.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gio/gfile.c b/gio/gfile.c index 812b148b7..440558260 100644 --- a/gio/gfile.c +++ b/gio/gfile.c @@ -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