[comp.bugs.4bsd] no EOF for stream unix socket reader

jong@dizzy.wpd.sgi.com (Jong Kim) (07/19/90)

With a stream unix socket, shouldn't the PRU_SHUTDOWN case in uipc_usrreq.c
call socantrecvmore for the receiver's socket? Currently the receiver
is not notified if the writer calls shutdown(how = 1). The following
change in uipc_usrreq.c will cause the receiver to get EOF after reading
all remaining data.


unp_usrclosed(unp)
        struct unpcb *unp;
{
        struct socket *so;
        if (!unp || unp->unp_inode || !unp->unp_conn)
                return;
        if ((so = unp->unp_conn->unp_socket) != NULL)
                socantrcvmore(so);
}

\jong