no EOF for stream unix socket reader

Jong Kim jong at dizzy.wpd.sgi.com
Thu Jul 19 12:55:18 AEST 1990


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



More information about the Comp.bugs.4bsd.ucb-fixes mailing list