lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <tencent_388496926EE0228075FA6B3D@qq.com>
Date:	Tue, 26 Jul 2011 13:32:23 +0800
From:	"ZHOU Xiaobo" <xb.zhou@...com>
To:	"Rick Jones" <rick.jones2@...com>,
	"Huajun Li" <huajun.li.lee@...il.com>
Cc:	"netdev" <netdev@...r.kernel.org>
Subject: Re: write() udp socket

------------------
Sincerely yours
                         ZHOU Xiaobo
 
 
 
------------------ Original ------------------
From:  "Rick Jones"<rick.jones2@...com>;
Date:  Tue, Jul 26, 2011 01:38 AM
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."



yeah, the same as I think. If so the answer of Question No.2 is 'yes' too?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ