about summary refs log tree commit homepage
path: root/ci/run.sh
diff options
context:
space:
mode:
authorEric Wong <e@yhbt.net>2020-04-11 10:53:30 +0000
committerEric Wong <e@yhbt.net>2020-04-15 10:16:05 +0000
commit6645b8d288752cc94324efeffe68ce8a704598a3 (patch)
treeffccc53f2f0d21e46ea27ba72aa8193a5fd3452d /ci/run.sh
parentdaab9cf0b8fcd66d1cb7f62f7ea9a8b0e32320ef (diff)
downloadpublic-inbox-6645b8d288752cc94324efeffe68ce8a704598a3.tar.gz
I've observed FreeBSD 11.2 read(2) having one of three
behaviors after a failed write(2) on a socket:

1) returning number of bytes read
2) failing with ECONNRESET
3) returning with EOF

1) is the most common, and I've only seen 1) on Linux.  It may
be possible to use SO_LINGER or shutdown(2) to ensure 1) always
happens, but SO_LINGER behavior seems inconsistent across OSes,
especially with non-blocking sockets.

Since these tests are corner-cases where we're dealing with
broken/malicious clients, lets continue spending the least
amount of syscalls protecting ourselves in the daemon and
instead make the client-side test code tolerate more socket
implementations.
Diffstat (limited to 'ci/run.sh')
0 files changed, 0 insertions, 0 deletions