]> 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>
Wed, 6 Jun 2012 17:33:26 +0000 (10:33 -0700)
commit78a7f11e7c93c953a745134cd61e63a415642cf5
tree684e21cf3e81b4f5bd740456e0fea103e52d7d1f
parent7e43a759255e9890d1e41f1edf71792836f53941
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 unless SHUT_RDWR is specified,
or the socket is closed.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
src/rsocket.c