Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Lib/test/test_select.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def test_returned_list_identity(self):
self.assertIsNot(r, x)
self.assertIsNot(w, x)

@unittest.skipUnless(hasattr(os, 'popen'), "need os.popen()")
@support.requires_fork()
def test_select(self):
code = textwrap.dedent('''
import time
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
:func:`select.select` now passes ``NULL`` to ``select`` for each empty fdset.
7 changes: 6 additions & 1 deletion Modules/selectmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,12 @@ select_select_impl(PyObject *module, PyObject *rlist, PyObject *wlist,
do {
Py_BEGIN_ALLOW_THREADS
errno = 0;
n = select(max, &ifdset, &ofdset, &efdset, tvp);
n = select(
max,
imax ? &ifdset : NULL,
omax ? &ofdset : NULL,
emax ? &efdset : NULL,
tvp);
Py_END_ALLOW_THREADS

if (errno != EINTR)
Expand Down