Subject: Re: sendto(2) EINVAL / pacing problem
To: None <>
From: Christoph Kaegi <>
List: tech-net
Date: 02/09/2004 16:53:15
On 09.02-14:49, Christos Zoulas wrote:
> >So I have the following questions:
> >
> >- How do I go about pacing sendto(2) on a non-blocking socket?
> select/poll to see if you can write to it?

Ah, thanks. I guess I didn't see the wood for the trees anymore.
(Happens often with me when I look into Stevens' UNP)

> >- Is sendto(2) giving me a misleading/wrong error message? 
> >  Or is the sendto(2) manpage not concise enough?
> Yes, it is. There are many places in the sendto() code where EINVAL
> can be returned. The only way that you can figure it out, is to add
> printfs and recompile the kernel.

Would it be possible, to update the sendto(2) manpage to include
this important hint?

I'm using select and now it's not only the client, which times out
anymore, but also the server. So maybe it's not a resource limit...

Hm, where do I find the file containing sendto()?
By a quick search I only found src/lib/libc/net/send.c which calls 
sendto() itself.

Can I just use printf in the kernel?


Christoph Kaegi