safe_timeout 0.0.1 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/safe_timeout/interrupting_child_process.rb +5 -2
- data/lib/safe_timeout/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2a1dc91fe9838d18748dfa219507d52abfbbc072
|
4
|
+
data.tar.gz: 2415cf891a23e2cb38a608c489ab7fa9e18be384
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 00e4442f99e7143a0fbef4caf51c6f023578b13def7d0c058c393577c049e4aca26cf4874c8311e3869f9390b2d6b7650dbfd7533e8dab0144b2e1645b337966
|
7
|
+
data.tar.gz: 007b456918328c1b87edf436538af4bf1cb62fec547b5dd00751409aee6aaba24555523f01ab12ba118e02afb7046b8ed29d1b817f776be1254e07c865b5f326
|
@@ -8,10 +8,13 @@ module SafeTimeout
|
|
8
8
|
|
9
9
|
def start(&block)
|
10
10
|
Signal.trap("TRAP", &@on_timeout)
|
11
|
-
Kernel.fork { wait_for_expiration }
|
11
|
+
@child_pid = Kernel.fork { wait_for_expiration }
|
12
12
|
yield
|
13
13
|
ensure
|
14
|
-
|
14
|
+
begin
|
15
|
+
stop
|
16
|
+
rescue Errno::ESRCH
|
17
|
+
end
|
15
18
|
end
|
16
19
|
|
17
20
|
def stop
|
data/lib/safe_timeout/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: safe_timeout
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David McCullars
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-09-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|