diff options
author | Bryan Cantrill <bryan@joyent.com> | 2014-05-16 16:45:10 +0000 |
---|---|---|
committer | Bryan Cantrill <bryan@joyent.com> | 2014-05-16 16:45:10 +0000 |
commit | ccd38a70ceb49e112a6e85a46d676873817719b6 (patch) | |
tree | 6c304ddb5326168b5ed7ff59ed66f5520c36db7a /usr/src/uts/common | |
parent | 008facadb0da6f6b233ae8e2fb90c7a123118162 (diff) | |
download | illumos-joyent-ccd38a70ceb49e112a6e85a46d676873817719b6.tar.gz |
OS-2985 POLLHUP not generated for disconnected Unix domain sockets
Diffstat (limited to 'usr/src/uts/common')
-rw-r--r-- | usr/src/uts/common/fs/sockfs/socktpi.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/usr/src/uts/common/fs/sockfs/socktpi.c b/usr/src/uts/common/fs/sockfs/socktpi.c index 582db26448..43bc503ed1 100644 --- a/usr/src/uts/common/fs/sockfs/socktpi.c +++ b/usr/src/uts/common/fs/sockfs/socktpi.c @@ -6271,6 +6271,13 @@ sotpi_poll( if (sti->sti_conn_ind_head != NULL) *reventsp |= (POLLIN|POLLRDNORM) & events; + if (so->so_state & SS_CANTRCVMORE) { + *reventsp |= POLLRDHUP & events; + + if (so->so_state & SS_CANTSENDMORE) + *reventsp |= POLLHUP; + } + if (so->so_state & SS_OOBPEND) *reventsp |= POLLRDBAND & events; |