[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[or-cvs] and maybe some function documentation will help too



Update of /home2/or/cvsroot/tor/src/common
In directory moria:/home/arma/work/onion/cvs/tor/src/common

Modified Files:
	compat.c 
Log Message:
and maybe some function documentation will help too


Index: compat.c
===================================================================
RCS file: /home2/or/cvsroot/tor/src/common/compat.c,v
retrieving revision 1.80
retrieving revision 1.81
diff -u -p -d -r1.80 -r1.81
--- compat.c	23 Jan 2006 23:39:13 -0000	1.80
+++ compat.c	9 Feb 2006 02:59:37 -0000	1.81
@@ -441,9 +441,15 @@ tor_socketpair(int family, int type, int
 
 #define ULIMIT_BUFFER 32 /* keep 32 extra fd's beyond _ConnLimit */
 
-/** Get the maximum allowed number of file descriptors. (Some systems
- * have a low soft limit.) Make sure we set it to at least
- * <b>limit</b>. Return a new limit if we can, or -1 if we fail. */
+/** Learn the maximum allowed number of file descriptors. (Some systems
+ * have a low soft limit.
+ *
+ * We compute this by finding the largest number between <b>limit</b>
+ * and <b>cap</b> that we can use. If we can't find a number greater
+ * than or equal to <b>limit</b>, then we fail: return -1.
+ *
+ * Otherwise, return the number minus some buffer to allow for other
+ * file descriptors we'll want available for ordinary use. */
 int
 set_max_file_descriptors(unsigned long limit, unsigned long cap)
 {