*BSD News Article 72039


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!harbinger.cc.monash.edu.au!nntp.coast.net!news.kei.com!newsfeed.internetmci.com!howland.reston.ans.net!EU.net!news.eunet.fi!news.spb.su!satisfy.kiae.su!glukr!info.elvisti.kiev.ua!d210.ndiasb.kiev.ua!inec!news.ts.kiev.ua!news.isf.kiev.ua!news.free.net!news.phys.msu.su!satty.npi.msu.su!Radio-MSU.net!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: Fri, 21 Jun 1996 23:44:03 +0300
Organization: Macsimum, Ltd
Lines: 37
Message-ID: <boris-2106962344030001@boris.macsimum.gamma.ru>
References: <kurzaev-2106960147180001@boris.macsimum.gamma.ru> <4qc13h$12i@helena.MT.net>
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() system call actually
succeeded but returned the value of first descriptor in pair instead of 0.
This is strange because it conforms neither to man page nor to POSIX
specification. 

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