mutant 0.10.16 → 0.10.17
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/mutant/isolation/fork.rb +15 -4
- data/lib/mutant/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 977c03a9678ae669eaadb837b2d20402e92344cd1aa1d882c358c72819aea2f8
|
4
|
+
data.tar.gz: b27367b4065c83e34423221ba99d868e0a993d35b133eee8a99b18392aaf6a85
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a238aea95f75d4bbdccf7418824b62c24c82b56c6f6d04a1e2298783a2208135bf91a2b48e224ad628c033d3f0bf893f9dd6498f3b355133c59339bf5a26964c
|
7
|
+
data.tar.gz: bf517485919b231bd1994fbedab20741de57029add17a22ab15c2d2058c5c1d8453942583fc0a44d99220b09afe60ce891341d7ac42b4c5921cbdee666558503
|
@@ -64,6 +64,7 @@ module Mutant
|
|
64
64
|
end
|
65
65
|
end # Pipe
|
66
66
|
|
67
|
+
# rubocop:disable Metrics/ClassLength
|
67
68
|
class Parent
|
68
69
|
include(
|
69
70
|
Anima.new(*ATTRIBUTES),
|
@@ -149,17 +150,26 @@ module Mutant
|
|
149
150
|
|
150
151
|
break unless ready
|
151
152
|
|
152
|
-
ready.each do |
|
153
|
-
if
|
154
|
-
targets.delete(
|
153
|
+
ready.each do |target|
|
154
|
+
if target.eof?
|
155
|
+
targets.delete(target)
|
155
156
|
else
|
156
|
-
targets.fetch(
|
157
|
+
read_fragment(target, targets.fetch(target))
|
157
158
|
end
|
158
159
|
end
|
159
160
|
end
|
160
161
|
end
|
161
162
|
# rubocop:enable Metrics/MethodLength
|
162
163
|
|
164
|
+
def read_fragment(target, fragments)
|
165
|
+
loop do
|
166
|
+
result = target.read_nonblock(READ_SIZE, exception: false)
|
167
|
+
break unless result.instance_of?(String)
|
168
|
+
fragments << result
|
169
|
+
break if result.bytesize < READ_SIZE
|
170
|
+
end
|
171
|
+
end
|
172
|
+
|
163
173
|
# rubocop:disable Metrics/MethodLength
|
164
174
|
def terminate_graceful
|
165
175
|
status = nil
|
@@ -199,6 +209,7 @@ module Mutant
|
|
199
209
|
@result = defined?(@result) ? @result.add_error(result) : result
|
200
210
|
end
|
201
211
|
end # Parent
|
212
|
+
# rubocop:enable Metrics/ClassLength
|
202
213
|
|
203
214
|
class Child
|
204
215
|
include(
|
data/lib/mutant/version.rb
CHANGED