Hi, I noticed this test no longer works on volo onwards bits. Specifically, the client host (blocking sender side) never know of an SIGPIPE or EPIPE as soon as the receiver close its connection. The first write ever return successfully, which prevents the application from knowing the underlying failure. Any idea about why?
Thanks, $ cat tcp_flow_close.client # # Test the effect of closing the receiver socket when the sender # is blocked in a write. # Also test what happens to data on the read queue after the EPIPE # has ben delivered. # sleep time=3000 socket % socket done connect 0/8889 % connect done select read % select: (num 1) read recv peek % recv: (len 5) test2 write len=1000000 test1 % write: EPIPE <-- actual result: % write: ret 1000000 write len=1000000 test1 % write: EPIPE <-- actual result: % write: ENOTCONN recv % recv: (len 5) test2 recv % recv: ECONNRESET recv % recv: (len 0) close % close done socket % socket done connect 0/8889 % connect done select read % select: (num 1) read recv peek % recv: (len 5) test2 send len=1000000 test1 % send: EPIPE send len=1000000 test1 % send: EPIPE recv % recv: (len 5) test2 recv % recv: ECONNRESET recv % recv: (len 0) close % close done $ cat serv/tcp_flow_close.server # # Test the effect of closing the receiver socket when the sender # is blocked in a write. # socket % socket done bind 0/8889 % bind done listen % listen done accept anyport % accept: (len 16) 192.168.0.1/anyport select read % select: (num 1) read close % close done accept anyport % accept: (len 16) 192.168.0.1/anyport select read % select: (num 1) read close % close done
_______________________________________________ networking-discuss mailing list [email protected]
