Skip to content

redo blockingSockTest to check recv()/accept()/recvfrom()

Heinz Junkes requested to merge github/fork/mdavidsaver/blockingsock into 7.0

Created by: mdavidsaver

Expand blockingSockTest to cover interruption of accept() and recvfrom() as well as recv() to cover usage in pvAccessCPP.

This testing ensures that recv() is interrupted by shutdown() on all targets except WIN32. It also tests that, on Linux and RTEMS, shutdown() interrupts accept() and recvfrom() on a UDP socket.

The assurance wrt. RTEMS is required, as simply close()ing a socket may leave a concurrent accept() or recvfrom() unrecoverable stuck.

The assurance wrt. Linux is useful as it prevents a (so far theoretical) race which would lead to a worker calling recv()/send() and a closed, or reused, file descriptor.

Merge request reports

Loading