svn commit: trunk/uClibc/libc/misc/dirent

vapier at uclibc.org vapier at uclibc.org
Sat Feb 4 02:20:47 UTC 2006


Author: vapier
Date: 2006-02-03 18:20:46 -0800 (Fri, 03 Feb 2006)
New Revision: 13827

Log:
add note about racecondition

Modified:
   trunk/uClibc/libc/misc/dirent/opendir.c


Changeset:
Modified: trunk/uClibc/libc/misc/dirent/opendir.c
===================================================================
--- trunk/uClibc/libc/misc/dirent/opendir.c	2006-02-04 02:19:23 UTC (rev 13826)
+++ trunk/uClibc/libc/misc/dirent/opendir.c	2006-02-04 02:20:46 UTC (rev 13827)
@@ -42,6 +42,11 @@
 #endif
 	if ((fd = open(name, O_RDONLY|O_NDELAY|O_DIRECTORY)) < 0)
 		return NULL;
+	/* Note: we should check to make sure that between the stat() and open()
+	 * call, 'name' didnt change on us, but that's only if O_DIRECTORY isnt
+	 * defined and since Linux has supported it for like ever, i'm not going
+	 * to worry about it right now (if ever). */
+
 	/* According to POSIX, directory streams should be closed when
 	 * exec. From "Anna Pluzhnikov" <besp at midway.uchicago.edu>.
 	 */




More information about the uClibc-cvs mailing list