iso_latte 1.1 → 1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/iso_latte/version.rb +1 -1
- data/lib/iso_latte.rb +8 -5
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 30d8ef0d7afdd747760f17795fa0df8c2cfcf5ad
|
4
|
+
data.tar.gz: 431db2afed8cbe4c82bd353e064e389b5e0c8449
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6b830352207630b5f1d1658f5e23c64162c044d16e07e13f2480ae3d245126ff387a320f7a7ddb4c7c9133ecf7ed7cf07688dd028e694720b4f567dd717e3a3d
|
7
|
+
data.tar.gz: 4ccace0f1cf37fba92a561d864833404f11a807099740ccd5eac8615b6b1f63fcc26f96800075009fc6a1199b13d063c9bf004b3f7875bc4ac557da3fe01581a
|
data/lib/iso_latte/version.rb
CHANGED
data/lib/iso_latte.rb
CHANGED
@@ -27,7 +27,7 @@ module IsoLatte
|
|
27
27
|
# statuses I guess.
|
28
28
|
#
|
29
29
|
def self.fork(options = nil, &block)
|
30
|
-
defaults = { stderr
|
30
|
+
defaults = { :stderr => "/dev/null", :exit => nil }
|
31
31
|
opts = OpenStruct.new(defaults.merge(options || {}))
|
32
32
|
|
33
33
|
read_ex, write_ex = IO.pipe
|
@@ -46,10 +46,7 @@ module IsoLatte
|
|
46
46
|
block.call
|
47
47
|
end
|
48
48
|
rescue StandardError => e
|
49
|
-
|
50
|
-
ivars = ["@__better_errors_bindings_stack"]
|
51
|
-
ivars.each { |v| e.instance_variable_set(v, nil) if e.instance_variable_defined?(v) }
|
52
|
-
|
49
|
+
clean_up_for_marshal(e)
|
53
50
|
Marshal.dump e, write_ex
|
54
51
|
write_ex.flush
|
55
52
|
write_ex.close
|
@@ -110,5 +107,11 @@ module IsoLatte
|
|
110
107
|
# Save us from the race condition where it exited just as we decided to kill it.
|
111
108
|
end
|
112
109
|
|
110
|
+
def self.clean_up_for_marshal(e)
|
111
|
+
ivars = ["@__better_errors_bindings_stack", "@wrapped_exception"]
|
112
|
+
ivars.each { |v| e.instance_variable_set(v, nil) if e.instance_variable_defined?(v) }
|
113
|
+
clean_up_for_marshal(e.cause) if e.cause
|
114
|
+
end
|
115
|
+
|
113
116
|
class Error < StandardError; end
|
114
117
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: iso_latte
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: '1.
|
4
|
+
version: '1.2'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Emcien Engineering
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2015-
|
12
|
+
date: 2015-08-06 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description: IsoLatte allows execution to be forked from the main process for safety
|
15
15
|
email:
|
@@ -40,7 +40,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
40
40
|
version: '0'
|
41
41
|
requirements: []
|
42
42
|
rubyforge_project:
|
43
|
-
rubygems_version: 2.4.
|
43
|
+
rubygems_version: 2.4.8
|
44
44
|
signing_key:
|
45
45
|
specification_version: 4
|
46
46
|
summary: A gem for isolating execution in a subprocess
|