Date: Sun, 19 Nov 1995 22:56:08 GMT From: Michael Ryan <mike@networx.ie> To: FreeBSD Support <questions@freebsd.org> Subject: socketpair() won't work Message-ID: <ECS9511192208A@networx.ie>
next in thread | raw e-mail | index | archive | help
Hi all, I hope this isn't a stupid question, or a stupid oversight on my part, but I can't get socketpair() to work. I'm porting an application to FreeBSD and I need to get this working. The following code fragment works under Mips Unix but fails under FreeBSD. Can anybody see what's wrong? #include <stdio.h> #include <sys/types.h> #include <sys/socket.h> extern int errno; main () { int rc; int sd[2]; if ((rc=socketpair(AF_UNIX, SOCK_STREAM, 0, sd)) != 0) { perror("fail"); fprintf(stderr, "rc = %d, errno = %d\n", rc, errno); } } The above program produces this output: fail: Undefined error: 0 rc = 3, errno = 0 Thanks for any suggestions, Mike <mike@networx.ie>
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?ECS9511192208A>