re PR ada/6717 (Race condition in GNAT.Sockets.Create_Selector)
authorThomas Quinot <quinot@adacore.com>
Thu, 16 Jun 2005 08:41:50 +0000 (10:41 +0200)
committerArnaud Charlet <charlet@gcc.gnu.org>
Thu, 16 Jun 2005 08:41:50 +0000 (10:41 +0200)
commit564383da33e0a312edb3fc57ce5eddef8b5ab119
tree9a3decf2d8760e995c4cab0cca0f7835b0284741
parente5a97c132907d389b09a5f0d8f6ff94314d4c390
re PR ada/6717 (Race condition in GNAT.Sockets.Create_Selector)

2005-06-14  Thomas Quinot  <quinot@adacore.com>

PR ada/6717

* g-socket.ads, g-socket.adb (Inet_Addr): Special case the all-ones
broadcast address.
(Create_Selector): Bind listening socket used to create the signalling
socket pair to 127.0.0.1 to limit the scope for 'theft' of connection.
Set listen backlog to 1 to ensure that we detect socket theft by a
failure of our own connect(2) call.
(Check_Selector): Improve documentation of the selector mechanism.
(Broadcast_Inet_Addr): New constant.

From-SVN: r101043
gcc/ada/g-socket.adb
gcc/ada/g-socket.ads