Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 10 Feb 2004 11:34:26 +1100 (EST)
From:      Andrew <andrew@ugh.net.au>
To:        freebsd-hackers@freebsd.org
Subject:   Re: select, sendto and ENOBUFS
Message-ID:  <20040210111013.G56192-100000@starbug.ugh.net.au>
In-Reply-To: <20040210100257.G56192-100000@starbug.ugh.net.au>

next in thread | previous in thread | raw e-mail | index | archive | help


On Tue, 10 Feb 2004, Andrew wrote:

> I have a problem with sendto returning an error and setting errno to
> ENOBUFS however I am calling select first to make sure the fd is
> writeable (see below for code). s is a raw socket and the data I'm

I see something similar has actually been discussed before and I just
missed it.

http://docs.freebsd.org/cgi/mid.cgi?E1Aice9-0002by-00

The conclusion being that send, sendto and select will never block on a
UDP socket and the man page just doesn't make it too clear. I'm assuming
it is the same for raw sockets.

UNPv1 section 6.3 seems to say that select should work for UDP...Part 2
under "Under What Conditions Is a Descriptor Ready" certainly indicates
that select should work.

Anyway a bug or not, is there a better work around than sleeping? I'm
guessing not...

Thanks,

Andrew



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