Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 14 Nov 2007 15:21:43 -0700
From:      "Andrew Falanga" <af300wsm@gmail.com>
To:        "User Questions" <freebsd-questions@freebsd.org>
Subject:   Socket programming question
Message-ID:  <340a29540711141421tda33970q79f85533fb5ba725@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
Hi,

My question has to do with how someone would find out if a call to socket(2)
actually produced a socket.  I know that the API works, I've programmed with
it many times, but is there a way to find out if 's' returned by socket(2)
is actually valid in whatever kernel structure it is stored?  I understand
that I may have the process entirely mixed up.  But it seems to me that the
socket is somehow known to the kernel and I should be able to query the
kernel somehow and discover if it is valid.

Let me know if my question doesn't make sense as worded and I'll try to
explain myself better.  Another question related to this one, would someone
in this list know where the source code is, in the system source tree, for
the select call?

Thanks,
Andy



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?340a29540711141421tda33970q79f85533fb5ba725>