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>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Sun, 24 Jul 2011 16:33:10 +0800
From:	Huajun Li <huajun.li.lee@...il.com>
To:	ZHOU Xiaobo <xb.zhou@...com>
Cc:	netdev <netdev@...r.kernel.org>
Subject: Re: write() udp socket

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.

> question No2:
> Can I write() a UDP socket in multiple threads without locking?
>

In my opinion, you could. However, the receiver may not get what you expected.
>
> thanks
>
>
> ------------------
> Sincerely yours
>                         ZHOU Xiaobo
--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ