repo.or.cz
/
kgio.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
history
|
raw
|
HEAD
poll: deal with pollset changes on EINTR
[kgio.git]
/
test
/
test_connect_fd_leak.rb
blob
f6a854392b56bc2ed4a728120d59ca780d34f4f3
1
require 'test/unit'
2
require 'io/nonblock'
3
$-w = true
4
require 'kgio'
5
6
class TestConnectFDLeak < Test::Unit::TestCase
7
8
def test_unix_socket
9
nr = 0
10
path = "/non/existent/path"
11
assert(! File.exist?(path), "#{path} should not exist")
12
assert_nothing_raised do
13
begin
14
sock = Kgio::UNIXSocket.new(path)
15
rescue Errno::ENOENT
16
end while (nr += 1) < 10000
17
end
18
end
19
end