FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-138850: Add --disable-epoll to configure by mtelka · Pull Request #145768 · python/cpython · GitHub

/ cpython Public
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .ac  (1) .rst  (3) No extension  (1) All 3 file types selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
7 changes: 6 additions & 1 deletion Doc/library/select.rst
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ The module defines the following:

*sizehint* informs epoll about the expected number of events to be
registered. It must be positive, or ``-1`` to use the default. It is only
used on older systems where :c:func:`!epoll_create1` is not available;
used on older systems where :manpage:`epoll_create1(2)` is not available;
otherwise it has no effect (though its value is still checked).

*flags* is deprecated and completely ignored. However, when supplied, its
Expand All @@ -89,6 +89,11 @@ The module defines the following:
The *flags* parameter. ``select.EPOLL_CLOEXEC`` is used by default now.
Use :func:`os.set_inheritable` to make the file descriptor inheritable.

.. versionchanged:: next

When CPython is built, this function may be disabled using
:option:`--disable-epoll`.


.. function:: poll()

Expand Down
11 changes: 11 additions & 0 deletions Doc/using/configure.rst
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -463,6 +463,17 @@ General Options

``pkg-config`` options.

.. option:: --disable-epoll

Build without ``epoll``, meaning that :py:func:`select.epoll` will not be
present even if the system provides an
:manpage:`epoll_create <epoll_create(2)>` function.
This may be used on systems where :manpage:`!epoll_create` or
:manpage:`epoll_create1 <epoll_create1(2)>` is available
but incompatible with Linux semantics.

.. versionadded:: next


C compiler options
------------------
Expand Down
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add :option:`--disable-epoll` to ``configure``
27 changes: 27 additions & 0 deletions configure

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 14 additions & 2 deletions configure.ac
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -5383,8 +5383,20 @@ PY_CHECK_FUNC([symlink], [@%:@include <unistd.h>])
PY_CHECK_FUNC([fchdir], [@%:@include <unistd.h>])
PY_CHECK_FUNC([fsync], [@%:@include <unistd.h>])
PY_CHECK_FUNC([fdatasync], [@%:@include <unistd.h>])
PY_CHECK_FUNC([epoll_create], [@%:@include <sys/epoll.h>], [HAVE_EPOLL])
PY_CHECK_FUNC([epoll_create1], [@%:@include <sys/epoll.h>])

AC_MSG_CHECKING([for --disable-epoll])
AC_ARG_ENABLE([epoll],
[AS_HELP_STRING([--disable-epoll], [disable epoll (default is yes if supported)])],
[AS_VAR_IF([enable_epoll], [no], [disable_epoll=yes], [disable_epoll=no])],
[disable_epoll=no]
)
AC_MSG_RESULT([$disable_epoll])
if test "$disable_epoll" = "no"
then
PY_CHECK_FUNC([epoll_create], [@%:@include <sys/epoll.h>], [HAVE_EPOLL])
PY_CHECK_FUNC([epoll_create1], [@%:@include <sys/epoll.h>])
fi

PY_CHECK_FUNC([kqueue],[
#include <sys/types.h>
#include <sys/event.h>
Expand Down
Loading

Back | FazBrowse Home | New Git URL