Socket programming question

Andrew Falanga af300wsm at gmail.com
Wed Nov 14 14:21:46 PST 2007


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


More information about the freebsd-questions mailing list