From d33aba68b5aa92b7350fad22730994e695ffe470 Mon Sep 17 00:00:00 2001 From: Dan Albert Date: Mon, 16 Jun 2014 15:36:30 -0700 Subject: Switch from getdtablesize(3) to sysconf(3). Change-Id: I4741ea034fdadf1c6cd07c36aee3156f2415fae2 --- mobicore/daemon/Daemon/MobiCoreDriverDaemon.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mobicore/daemon/Daemon/MobiCoreDriverDaemon.cpp b/mobicore/daemon/Daemon/MobiCoreDriverDaemon.cpp index 40b46dc..0012e5a 100644 --- a/mobicore/daemon/Daemon/MobiCoreDriverDaemon.cpp +++ b/mobicore/daemon/Daemon/MobiCoreDriverDaemon.cpp @@ -1349,7 +1349,7 @@ int main(int argc, char *args[]) // obtain a new process group */ setsid(); /* close all descriptors */ - for (i = getdtablesize(); i >= 0; --i) { + for (i = sysconf(_SC_OPEN_MAX); i >= 0; --i) { close(i); } // STDIN, STDOUT and STDERR should all point to /dev/null */ -- cgit v1.2.3