• Show log

    Commit

  • Hash : e66df92c
    Author : Andy Pan
    Date : 2024-03-07T16:19:11

    Accept SOCK_NONBLOCK/SOCK_CLOEXEC in type argument of socketpair (#1567)
    
    Setting `SOCK_NONBLOCK` and `SOCK_CLOEXEC` in the `type` argument of `socketpair()` is widely supported across UNIX-like OS: Linux, *BSD, Solaris, etc., as is the `socket()`. This will conserve several extra system calls, we should use it where available.
    
    ### References
    
    - [socketpair(2) on Linux](https://man7.org/linux/man-pages/man2/socketpair.2.html#HISTORY)
    - [socketpair(2) on FreeBSD](https://man.freebsd.org/cgi/man.cgi?query=socketpair&sektion=2#DESCRIPTION)
    - [socketpair(2) on DragonFly](https://man.dragonflybsd.org/?command=socketpair&section=2)
    - [socketpair(2) on NetBSD](https://man.netbsd.org/socketpair.2#DESCRIPTION)
    - [socketpair(2) on OpenBSD](https://man.openbsd.org/socketpair.2)
    - [socketpair(3C) on Solaris](https://docs.oracle.com/cd/E88353_01/html/E37843/socketpair-3c.html)
    
    Changelog:
    - Set SOCK_NONBLOCK and SOCK_CLOEXEC in the type argument of socketpair
    - Avoid EPROTOTYPE on macOS and OpenBSD
    - Eliminate the warnings about unused variables
    - Add some comments

  • README.md

  • libevent logo

    CI Coverage Status Join the chat at https://gitter.im/libevent/libevent doxygen OpenSSF Scorecard

    1. BUILDING AND INSTALLATION

    CMake (Unix)

    mkdir build && cd build
    cmake ..     # Default to Unix Makefiles.
    make
    make verify  # (optional)

    See Documentation/Building#Building on Unix using CMake for more information.

    CMake (Windows)

    Install CMake: https://cmake.org/

    md build && cd build
    cmake -G "Visual Studio 10" ..   # Or use any generator you want to use. Run cmake --help for a list
    cmake --build . --config Release # Or "start libevent.sln" and build with menu in Visual Studio.

    See Documentation/Building#Building on Windows for more information.

    Package Managers

    You can download and install libevent using the vcpkg dependency manager:

    git clone https://github.com/Microsoft/vcpkg.git
    cd vcpkg
    ./bootstrap-vcpkg.sh
    ./vcpkg integrate install
    ./vcpkg install libevent

    The libevent port in vcpkg is kept up to date by Microsoft team members and community contributors. If the version is out of date, please create an issue or pull request on the vcpkg repository.

    Autoconf

    Note, since 2.2 it is deprecated

    ./configure
    make
    make verify   # (optional)
    sudo make install

    See Documentation/Building#Autoconf for more information.

    2. USEFUL LINKS:

    For the latest released version of Libevent, see the official website at https://libevent.org/ .

    There’s a pretty good work-in-progress manual up at http://www.wangafu.net/~nickm/libevent-book/ .

    For the latest development versions of Libevent, access our Git repository via

    $ git clone https://github.com/libevent/libevent.git

    You can browse the git repository online at:

    https://github.com/libevent/libevent

    To report bugs, issues, or ask for new features:

    Patches: https://github.com/libevent/libevent/pulls

    OK, those are not really patches. You fork, modify, and hit the “Create Pull Request” button. You can still submit normal git patches via the mailing list.

    Bugs, Features [RFC], and Issues: https://github.com/libevent/libevent/issues

    Or you can do it via the mailing list.

    There’s also a libevent-users mailing list for talking about Libevent use and development:

    https://archives.seul.org/libevent/users/

    3. ACKNOWLEDGMENTS

    The following people have helped with suggestions, ideas, code or fixing bugs.