[issue39742] Enhancement: add `os.getdtablesize(..)` to `os` (`posix`) module

2020-02-28 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
nosy: +larry

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39742] Enhancement: add `os.getdtablesize(..)` to `os` (`posix`) module

2020-02-24 Thread Enji Cooper


Change by Enji Cooper :


--
versions: +Python 3.9

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39742] Enhancement: add `os.getdtablesize(..)` to `os` (`posix`) module

2020-02-24 Thread Enji Cooper


New submission from Enji Cooper :

getdtablesize({2,3}) is a wonderful library call/system call to have access to 
because it allows one to determine the descriptor limits at runtime in an 
easier manner than having to do the equivalent with os.sysconf(..):

>>> os.sysconf(os.sysconf_names["SC_OPEN_MAX"])

This has been present in *BSD since time memorial [1] and in Linux since 2010 
[2], so I think it would be a good addition to the `os` (`posix`) module.

I will submit a diff for this in a few days, if it's deemed acceptable to have 
in the `posix` module.

1. 
https://www.freebsd.org/cgi/man.cgi?query=getdtablesize=2=freebsd-release-ports
2. http://man7.org/linux/man-pages/man2/getdtablesize.2.html

--
components: Library (Lib)
messages: 362603
nosy: ngie
priority: normal
severity: normal
status: open
title: Enhancement: add `os.getdtablesize(..)` to `os` (`posix`) module
type: enhancement

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com