*BSD News Article 71972


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!harbinger.cc.monash.edu.au!news.rmit.EDU.AU!news.unimelb.EDU.AU!munnari.OZ.AU!news.ecn.uoknor.edu!news.eng.convex.com!newshost.convex.com!newsgate.duke.edu!news.mathworks.com!newsfeed.internetmci.com!in2.uu.net!EU.net!news.eunet.fi!news.spb.su!satisfy.kiae.su!Gamma.RU!srcc!macsimum.gamma.ru!boris.macsimum.gamma.ru!user
From: boris@macsimum.gamma.ru (Boris Lavrinovich)
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: socketpair() in 2.2-960612-SNAP
Date: Wed, 26 Jun 1996 00:52:30 +0300
Organization: Macsimum, Ltd
Lines: 37
Message-ID: <boris-2606960052300001@boris.macsimum.gamma.ru>
NNTP-Posting-Host: boris.macsimum.gamma.ru

In article <4qc13h$12i@helena.MT.net>, "Nate Williams"
<nate@sneezy.sri.com> wrote:

> In article <kurzaev-2106960147180001@boris.macsimum.gamma.ru>,
> Boris Lavrinovich <kurzaev@macsimum.gamma.ru> wrote:
> >I installed 2.2-960612-SNAP and discovered that socketpair() system call
> >returns "File exists" error in my programs. I used Linux before and
> >suppose that there should be /dev/unix device but there is no such device.
> 
> Why should there be a /dev/unix device?
> 
> >Should I set any options in kernel to make it work? I did not find any.
> 
> It should work fine now.  What does your code look like?  I suspect you
> are using some sort of non-portable Linuxism (is that a word?) that doesn't
> exist on FreeBSD.

Oh, I have found where the problem is. socketpair() actually succeeded but
returned the value of first descriptor in pair instead of 0. This is
strange because it does not conform to man page (I am not sure wheither it
comforms to POSIX too). 

So the code that tests return value not to be equal -1 will work, but code
that tests return value to be equal 0 won't. This is nor a big problem for
me, but I suppose it should be fixed.

Boris.


=============================================
Boris Lavrinovich
Macsimum, Ltd

119899 Moscow University Computer Center
Vorobiovy Gory Moscow Russia
Voice: (095) 939-2471  Fax: (095) 939-1022
Internet:  boris@macsimum.gamma.ru