Path: utzoo!utgpu!watserv1!watmath!att!att!linac!pacific.mps.ohio-state.edu!zaphod.mps.ohio-state.edu!rpi!julius.cs.uiuc.edu!apple!bionet!ames!sgi!shinobu!odin!speaker!coolidge From: coolidge@speaker.sgi.com (Don Coolidge) Newsgroups: comp.sys.hp Subject: Re: HP-UX "socketpair" again. Summary: It's Not Supported Keywords: HP-UX, socketpair Message-ID: <1990Nov28.232754.22077@odin.corp.sgi.com> Date: 28 Nov 90 23:27:54 GMT References: <1796@kuling.UUCP> Sender: news@odin.corp.sgi.com (Net News) Reply-To: coolidge@speaker.UUCP (Don Coolidge) Organization: Silicon Graphics Inc., Mtn. View, CA Lines: 33 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 >#include >#include >#include >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