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
reinstate the original (and dangerous) autopush in C
[kgio.git]
/
test
/
test_connect_fd_leak.rb
blob
1dfc4cd4b01f20816ad0be81718b14cf95c3c5a7
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
begin
13
sock = Kgio::UNIXSocket.new(path)
14
rescue Errno::ENOENT
15
end while (nr += 1) < 10000
16
end
17
end