about summary refs log tree commit homepage
path: root/test/test_unix_connect.rb
DateCommit message (Collapse)
2013-09-07Close tempfile and unlink it immediately.
When a Tempfile object is garbage collected, or when the Ruby interpreter exits, its associated temporary file is automatically deleted. This may lead to race condition when Tempfile is used like in these tests. Signed-off-by: Eric Wong <normalperson@yhbt.net>
2013-09-04Create own directory for every unix socket in unit tests
[ew: this avoids a TOCTOU issue for multiple test invocations] Signed-off-by: Eric Wong <normalperson@yhbt.net>
2013-09-02Change prefix of temporary sockets to prevent races
Note: this is an incomplete fix and the race can still happen. A proper fix would involve using a temporary directory for each test and placing the Unix socket in there. Signed-off-by: Eric Wong <normalperson@yhbt.net>
2011-11-17connect,tryopen: set close-on-exec flag for new fds on Ruby 2.0+
All IO objects created by Kgio will have FD_CLOEXEC descriptor flag set on it when run under Ruby 2.0.0dev. This matches the upcoming behavior of Ruby 2.0.0dev for IO objects in the core and standard library. This change does not affect users on Ruby 1.9.3 and earlier. accept()-ed sockets in kgio have _always_ had FD_CLOEXEC set by default.
2010-11-18switch entirely to kgio_wait_*able methods
This removes the global Kgio.wait_*able accesors and requires each class to define (or fall back to) the Kgio::DefaultWaiters methods.
2010-09-27"start" singleton methods for non-blocking connect
These initiate (but do not wait for) non-blocking connects.
2010-09-25initial commit + release
everything shou^Wmight be working...