childprocess 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/childprocess.gemspec +1 -1
- data/lib/childprocess/jruby/process.rb +2 -2
- data/spec/childprocess_spec.rb +5 -0
- metadata +1 -1
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.5
|
data/childprocess.gemspec
CHANGED
@@ -13,11 +13,11 @@ module ChildProcess
|
|
13
13
|
false
|
14
14
|
end
|
15
15
|
|
16
|
-
def stop
|
16
|
+
def stop(timeout = nil)
|
17
17
|
assert_started
|
18
18
|
|
19
19
|
@process.destroy
|
20
|
-
@process.waitFor
|
20
|
+
@process.waitFor # no way to actually use the timeout here..
|
21
21
|
|
22
22
|
@exit_code = @process.exitValue
|
23
23
|
end
|
data/spec/childprocess_spec.rb
CHANGED
@@ -32,6 +32,11 @@ describe ChildProcess do
|
|
32
32
|
process.should be_exited
|
33
33
|
end
|
34
34
|
|
35
|
+
it "accepts a timeout argument to #stop" do
|
36
|
+
process = sleeping_ruby.start
|
37
|
+
process.stop(EXIT_TIMEOUT)
|
38
|
+
end
|
39
|
+
|
35
40
|
it "lets child process inherit the environment of the current process" do
|
36
41
|
Tempfile.open("env-spec") do |file|
|
37
42
|
with_env('env-spec' => 'yes') do
|