mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* lib/open3.rb: Merge from 1.7: Turn sync on for the writer
handle. * lib/ping.rb: Merge from 1.7: Fix a typo. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@2848 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
9a014d0d2b
commit
8b16ef7897
3 changed files with 9 additions and 1 deletions
|
|
@ -1,3 +1,10 @@
|
|||
Wed Sep 11 16:49:26 2002 Akinori MUSHA <knu@iDaemons.org>
|
||||
|
||||
* lib/open3.rb: Merge from 1.7: Turn sync on for the writer
|
||||
handle.
|
||||
|
||||
* lib/ping.rb: Merge from 1.7: Fix a typo.
|
||||
|
||||
Wed Sep 11 16:24:22 2002 Akinori MUSHA <knu@iDaemons.org>
|
||||
|
||||
* lib/thread.rb: Merge from 1.7: Get rid of race condition in
|
||||
|
|
|
|||
|
|
@ -40,6 +40,7 @@ module Open3
|
|||
pe[1].close
|
||||
Process.waitpid(pid)
|
||||
pi = [pw[1], pr[0], pe[0]]
|
||||
pw[1].sync = true
|
||||
if defined? yield
|
||||
begin
|
||||
return yield(*pi)
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ module Ping
|
|||
def pingecho(host, timeout=5, service="echo")
|
||||
begin
|
||||
timeout(timeout) do
|
||||
s = TCPsocket.new(host, service)
|
||||
s = TCPSocket.new(host, service)
|
||||
s.close
|
||||
end
|
||||
rescue Errno::ECONNREFUSED
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue