[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <4E2DAA04.2070205@hp.com>
Date: Mon, 25 Jul 2011 10:38:12 -0700
From: Rick Jones <rick.jones2@...com>
To: Huajun Li <huajun.li.lee@...il.com>
CC: ZHOU Xiaobo <xb.zhou@...com>, netdev <netdev@...r.kernel.org>
Subject: Re: write() udp socket
On 07/24/2011 01:33 AM, Huajun Li wrote:
> 2011/7/23 ZHOU Xiaobo<xb.zhou@...com>:
>> question No1:
>> When I call
>> ssize_t write(int fd, const void *buf, size_t count);
>>
>>
>> on a nonblocking UDP socket, is the return value always equal to 'count'?
>>
>>
>
> I don't think so. The function may be interrupt by signal or return
> due to other reason, so the return value only represents the size it
> writes successfully to the fd.
I believe it should either appaear to succeed or fail. write() best not
be sending partial UDP datagrams. That would be "bad."
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists