From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mx.groups.io with SMTP id smtpd.web09.39092.1628872428758252060 for ; Fri, 13 Aug 2021 09:33:49 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 134.134.136.24, mailfrom: michael.d.kinney@intel.com) X-IronPort-AV: E=McAfee;i="6200,9189,10075"; a="215581626" X-IronPort-AV: E=Sophos;i="5.84,319,1620716400"; d="scan'208";a="215581626" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Aug 2021 09:33:47 -0700 X-IronPort-AV: E=Sophos;i="5.84,319,1620716400"; d="scan'208";a="422267909" Received: from mdkinney-mobl2.amr.corp.intel.com ([10.212.171.152]) by orsmga006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Aug 2021 09:33:47 -0700 From: "Michael D Kinney" To: devel@edk2.groups.io Cc: Jayaprakash Nevara , Daryl McDaniel , Jaben Carsey , Rebecca Cran Subject: [edk2-libc Patch] StdLib/Include/sys/syslimits.h: Increase OPEN_MAX from 20 to 255 Date: Fri, 13 Aug 2021 09:33:35 -0700 Message-Id: <20210813163335.11-1-michael.d.kinney@intel.com> X-Mailer: git-send-email 2.32.0.windows.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Jayaprakash Nevara REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3548 A port of Python 3.6.8 interpreter for UEFI uses the standard C Library from the edk2-libc project. The python interpreter fails with the following error when the python interpreter is launched: "IOError: [Errno 24] Too many open files" Python 3.6.8 interpreter opens and loads many python modules (files) when it is boot strapped and this is leading to the too many open files error. To fix the issue the OPEN_MAX limit value is increased from 20 to 255. Cc: Daryl McDaniel Cc: Jaben Carsey Cc: Michael D Kinney Cc: Rebecca Cran Signed-off-by: Jayaprakash Nevara --- StdLib/Include/sys/syslimits.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/StdLib/Include/sys/syslimits.h b/StdLib/Include/sys/syslimits.h index 9515e8f..70ec619 100644 --- a/StdLib/Include/sys/syslimits.h +++ b/StdLib/Include/sys/syslimits.h @@ -53,7 +53,7 @@ #define MAX_OUTPUT 255 ///< Maximum bytes in terminal output. #define NAME_MAX 255 ///< Maximum bytes in a file name. #ifndef OPEN_MAX - #define OPEN_MAX 20 ///< Maximum open files per process. + #define OPEN_MAX 255 ///< Maximum open files per process. #endif #define PATH_MAX 1024 ///< Maximum bytes in pathname. #define PIPE_BUF 512 ///< Maximum bytes for atomic pipe writes. -- 2.32.0.windows.1