mssh 0.0.6 → 0.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/bin/mssh +1 -1
- data/lib/mcmd.rb +4 -2
- metadata +18 -4
data/bin/mssh
CHANGED
data/lib/mcmd.rb
CHANGED
@@ -1,6 +1,8 @@
|
|
1
1
|
#!/usr/bin/ruby
|
2
2
|
|
3
3
|
require 'pp'
|
4
|
+
require 'rubygems'
|
5
|
+
require 'io/poll'
|
4
6
|
|
5
7
|
class MultipleCmd
|
6
8
|
|
@@ -131,7 +133,7 @@ class MultipleCmd
|
|
131
133
|
write_fds = @subproc_by_pid.values.select {|x| not x.stdin_fd.nil? and not x.terminated}.map {|x| x.stdin_fd}
|
132
134
|
read_fds = @subproc_by_pid.values.select {|x| not x.terminated}.map {|x| [x.stdout_fd, x.stderr_fd].select {|x| not x.nil? } }.flatten
|
133
135
|
|
134
|
-
read_fds, write_fds, err_fds = IO.
|
136
|
+
read_fds, write_fds, err_fds = IO.select_using_poll(read_fds, write_fds, nil, self.poll_period)
|
135
137
|
|
136
138
|
self.process_read_fds(read_fds) unless read_fds.nil?
|
137
139
|
self.process_write_fds(write_fds) unless write_fds.nil?
|
@@ -239,7 +241,7 @@ class MultipleCmd
|
|
239
241
|
# We may have waited on a child before reading all its output. Collect those missing bits. No blocking.
|
240
242
|
if not just_reaped.empty?
|
241
243
|
read_fds = just_reaped.select {|x| not x.terminated}.map {|x| [x.stdout_fd, x.stderr_fd].select {|x| not x.nil? } }.flatten
|
242
|
-
read_fds, write_fds, err_fds = IO.
|
244
|
+
read_fds, write_fds, err_fds = IO.select_using_poll(read_fds, nil, nil, 0)
|
243
245
|
self.process_read_fds(read_fds) unless read_fds.nil?
|
244
246
|
end
|
245
247
|
just_reaped.each do |p|
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mssh
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 17
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 7
|
10
|
+
version: 0.0.7
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Evan Miller
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date:
|
18
|
+
date: 2013-02-14 00:00:00 Z
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
21
|
name: json
|
@@ -31,6 +31,20 @@ dependencies:
|
|
31
31
|
version: "0"
|
32
32
|
type: :runtime
|
33
33
|
version_requirements: *id001
|
34
|
+
- !ruby/object:Gem::Dependency
|
35
|
+
name: io-poll
|
36
|
+
prerelease: false
|
37
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
38
|
+
none: false
|
39
|
+
requirements:
|
40
|
+
- - ">="
|
41
|
+
- !ruby/object:Gem::Version
|
42
|
+
hash: 3
|
43
|
+
segments:
|
44
|
+
- 0
|
45
|
+
version: "0"
|
46
|
+
type: :runtime
|
47
|
+
version_requirements: *id002
|
34
48
|
description: Simple library for running jobs and sshing to many hosts at once.
|
35
49
|
email:
|
36
50
|
- github@squareup.com
|