main()
{
s = socket(AF_UNIX,SOCK_STREAM,0);
bind(s,.....);
listen(s,5);
accept(s,.....); <--- doesn't block
....
}
but with select(2) it blocks :) Just checked.
I suspect problem is here :
net/core/datagram.c
static int wait_for_packet(struct sock * sk, int *err)
{
....
error = -ENOTCONN;
if(connection_based(sk) && sk->state!=TCP_ESTABLISHED)
goto out; ^^^^^^^^^^^^^^^ should be TCP_LISTEN ?
....
}
:) Just curious if I'm right.
ps.
Or maybe it's even intended behaviour ?
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/