[edk2-devel] [edk2-libc Patch] StdLib/Include/sys/syslimits.h: Increase OPEN_MAX from 20 to 255

Rebecca Cran rebecca at nuviainc.com
Thu Aug 19 01:43:58 UTC 2021


Reviewed-by: Rebecca Cran <rebecca at nuviainc.com>


On 8/13/21 10:33 AM, Michael D Kinney wrote:
> From: Jayaprakash Nevara <n.jayaprakash at intel.com>
>
> 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 <edk2-lists at mc2research.org>
> Cc: Jaben Carsey <jaben.carsey at intel.com>
> Cc: Michael D Kinney <michael.d.kinney at intel.com>
> Cc: Rebecca Cran <rebecca at nuviainc.com>
> Signed-off-by: Jayaprakash Nevara <n.jayaprakash at intel.com>
> ---
>   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.


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#79545): https://edk2.groups.io/g/devel/message/79545
Mute This Topic: https://groups.io/mt/84867510/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-





More information about the edk2-devel-archive mailing list