]> git.openfabrics.org - ~shefty/librdmacm.git/commit
rsocket: Handle SHUT_RD/WR shutdown flags
authorSean Hefty <sean.hefty@intel.com>
Mon, 4 Jun 2012 20:14:42 +0000 (13:14 -0700)
committerSean Hefty <sean.hefty@intel.com>
Mon, 4 Jun 2012 20:14:42 +0000 (13:14 -0700)
commitce64f74204d2407dd9bdc340f97ed7aeeb9e5032
tree0c5a0c24885960bf61c5afe1b2ef070808c1f084
parenta459c228426c4d25684dcfd2a4203f013f0b454e
rsocket: Handle SHUT_RD/WR shutdown flags

Sridhar Samudrala <sri@us.ibm.com> reported an error (EOPNOTSUPP)
after calling select().

The issue is that rshutdown(SHUT_WR) was called before select().
As part of shutdown, rsockets switches the underlying fd from
nonblocking to blocking to ensure that previously sent data has
completed.  shutdown(SHUT_WR) indicates that the socket should be
kept open for receiving data.

Delay handling the actual shutdown until both the read and write
streams have been disconnected.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>