[Bug 227259] accept()/poll() and shutdown()/close() - not work as in FreeBSD10, may broke many apps

From: <bugzilla-noreply_at_freebsd.org>
Date: Thu, 15 Feb 2024 18:49:10 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=227259

--- Comment #19 from commit-hook@FreeBSD.org ---
A commit in branch main references this bug:

URL:
https://cgit.FreeBSD.org/src/commit/?id=bc9107f8c405ce83f47abc915ae95baadb770d6d

commit bc9107f8c405ce83f47abc915ae95baadb770d6d
Author:     Gleb Smirnoff <glebius@FreeBSD.org>
AuthorDate: 2024-02-15 18:48:44 +0000
Commit:     Gleb Smirnoff <glebius@FreeBSD.org>
CommitDate: 2024-02-15 18:48:44 +0000

    socket tests: add listener_wakeup

    This test runs several scenarios when sleep(9) on a listen(2)ing socket is
    interrupted by shutdown(2) or by close(2).  What should happen in that
    case is not specified, neither is documented.  However, there is certain
    behavior that we have and this test makes sure it is preserved.  There is
    software that relies on it, see bug 227259.  This test is based on
    submission with this bug, bugzilla attachment 192260.

    The test checks TCP and unix(4) stream socket behavior and SCTP can be
    added easily if needed.

    The test passes on FreeBSD 11 to 15.  It won't pass on FreeBSD 10,
    although the wakeup behavior of shutdown(2) is the same, but it doesn't
    return error.

    PR:     227259

 tests/sys/kern/Makefile                |   2 +
 tests/sys/kern/listener_wakeup.c (new) | 293 +++++++++++++++++++++++++++++++++
 2 files changed, 295 insertions(+)

-- 
You are receiving this mail because:
You are on the CC list for the bug.