irf@kuling.UUCP (Bo Thide') (11/16/90)
Still trying to get a "socketpair" for HP-UX 7.0 I tried the following:
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/ioctl.h>
#include <syscall.h>
main()
{
int sockets_in[2];
syscall(SYS_socketpair, AF_UNIX, SOCK_STREAM, 0, sockets_in);
}
However, this dumps core with a "Bad system call" message. What is
wrong here?
Bo
coolidge@speaker.sgi.com (Don Coolidge) (11/29/90)
In article <1796@kuling.UUCP> bt@irfu.se (Bo Thide') writes: > >Still trying to get a "socketpair" for HP-UX 7.0 I tried the following: > >#include <sys/types.h> >#include <sys/socket.h> >#include <sys/ioctl.h> >#include <syscall.h> >main() >{ > int sockets_in[2]; > > syscall(SYS_socketpair, AF_UNIX, SOCK_STREAM, 0, sockets_in); >} > >However, this dumps core with a "Bad system call" message. What is >wrong here? > >Bo As of 7.0, HP-UX does not support the socketpair() system call, so it's not surprising you dump core. If you really need it, you should roll your own as a library routine that, depending on the flavor of sockets you require (STREAM, DGRAM) makes two separate socket() calls, performs any appropriate bind(), listen(), connect(), and accept() calls, and returns the two relevant file descriptors to you; then link in that library when compiling your application. (Of course, this does not necessarily imply that the situation will be likewise for 8.0...) - Don Coolidge coolidge@speaker.wpd.sgi.com
eric@crg5.UUCP (Eric Okholm) (12/05/90)
coolidge@speaker.sgi.com (Don Coolidge) writes: >(Of course, this does not necessarily imply that the situation will be likewise >for 8.0...) Okay. But tell me, is 8.0 out? If not, when will it be released? I wanted to get an 9000/360 workstation but I would prefer to get state of the art stuff such as socketpair()... :^)