Skip to content
Commit ed4db723 authored by Andrey Ryabinin's avatar Andrey Ryabinin Committed by Pavel Emelyanov
Browse files

sk-unix: ignore shutdown mismatch in unix sockets



Usually unix stream sockets have consistent shutdown state
(if one end shutdown for read than other end will be shut down for write).
However sometimes it's possible to have stream sockets with mismatched
shutdown state. This happens if we connect() already shut down socket
(see upcoming sockets03.c test for example).

On read()/write() kernel always checks shutdown state on both ends, so
from userspace POV sockets with mismatched shutdown state behave the same
way as with matched state. So I think that we can just ignore shutdown
mismatch during dump, and just restore sockets with matching shutdown
state. Process should not see the differences.

Signed-off-by: default avatarAndrey Ryabinin <aryabinin@virtuozzo.com>
Acked-by: default avatarAndrew Vagin <avagin@virtuozzo.com>
Signed-off-by: default avatarPavel Emelyanov <xemul@virtuozzo.com>
parent 8239be8f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment