[wiaflos-devel] COMMIT - r264 - trunk/wiaflos/server
svn at linuxrulz.org
svn at linuxrulz.org
Thu Dec 25 07:25:53 GMT 2008
Author: nkukard
Date: 2008-12-25 07:25:53 +0000 (Thu, 25 Dec 2008)
New Revision: 264
Modified:
trunk/wiaflos/server/system.pm
Log:
* Added OpenMax function to return the number of maximum file handles
Modified: trunk/wiaflos/server/system.pm
===================================================================
--- trunk/wiaflos/server/system.pm 2008-12-25 07:24:47 UTC (rev 263)
+++ trunk/wiaflos/server/system.pm 2008-12-25 07:25:53 UTC (rev 264)
@@ -32,6 +32,8 @@
@EXPORT_OK = qw(
hashPassword
+ OpenMax
+
SOAP_Param_Escape
SOAP_Param_UnEscape
$SOAP_Param_Regex
@@ -45,6 +47,7 @@
use Digest::MD5;
use URI::Escape;
+use POSIX;
# Set globals
@@ -113,6 +116,12 @@
return uri_unescape($param);
}
+# Return the maximum number of possible file descriptors
+sub OpenMax {
+ my $openmax = POSIX::sysconf( &POSIX::_SC_OPEN_MAX );
+ (!defined($openmax) || $openmax < 0) ? 1024 : $openmax;
+}
+
1;
# vim: ts=4
More information about the wiaflos-devel
mailing list