The BSD's, like macOS store the SO_LINGER value in a signed short internally, so we need to clamp the value to 32767 for all the BSD's, not only macOS.
This work is sponsored by The FreeBSD Foundation --------- - [x] I confirm that I make this contribution in accordance with the [OpenJDK Interim AI Policy](https://openjdk.org/legal/ai). ------------- Commit messages: - Reduce max SO_LINGER value for BSD - Add a method to determine if the OS is *BSD Changes: https://git.openjdk.org/jdk/pull/33248/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=33248&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8393721 Stats: 8 lines in 3 files changed: 4 ins; 0 del; 4 mod Patch: https://git.openjdk.org/jdk/pull/33248.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/33248/head:pull/33248 PR: https://git.openjdk.org/jdk/pull/33248
