[BUG?] Unix Domain sockets in 2.4 series ?

Krzysztof Rusocki (maxikazz@loiv.torun.pl)
Sat, 3 Feb 2001 19:04:19 +0100 (CET)


I ain't kernel developer .. just poor little user,
but i think you might want to look at this stuff below...

I only tried that little code remotely so i do NOT know
what's system reaction on console ...

Anyway socket interface goes bye bye after this...

I tried it on 2.4.1-XFS and 2.4.0-XFS (both remotely)
and effects were exactly the same...

#include <stdio.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/socket.h>
int main(int argc, const char* argv[])
{
int retval;
int sockets[2];
char buf[1];
retval = socketpair(PF_UNIX, SOCK_DGRAM, 0, sockets);
if (retval != 0)
{
perror("socketpair");
exit(1);
}
shutdown(sockets[0], SHUT_RDWR);
read(sockets[0], buf, 1);
}

- Krzysztof

PS.
CC reply for me, i am not subscriber of lkml
thanks :)

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/