debug_socket 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +1 -1
- data/CHANGES.md +3 -0
- data/lib/debug_socket.rb +6 -1
- data/lib/debug_socket/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: a609fdc91513a829e00043448a126f8e872efa1a
|
4
|
+
data.tar.gz: d692816e0c4ac345f71be7b987d6369ff30e7887
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b39b0daf4e4998e7d6fe92eab39c3253ddfe4a0b92be293e3e2b455f70ba133879da752ad3c36b290aa282fd17d6e86351b92bef1ec9e0e3d9f7a4d17088aea7
|
7
|
+
data.tar.gz: 7bdfe79335aa5fd018d9dedd6767126abd05e1ea79ccebc4b278cc8f90b1e220225eb935c4c7e908e55207419d1e54c89f1bfcd0665ade650e4d64310eb7eb35
|
data/.travis.yml
CHANGED
data/CHANGES.md
CHANGED
data/lib/debug_socket.rb
CHANGED
@@ -4,6 +4,7 @@ require "time"
|
|
4
4
|
|
5
5
|
module DebugSocket
|
6
6
|
@thread = nil
|
7
|
+
@pid = Process.pid
|
7
8
|
|
8
9
|
def self.logger=(logger)
|
9
10
|
@logger = logger
|
@@ -16,7 +17,10 @@ module DebugSocket
|
|
16
17
|
end
|
17
18
|
|
18
19
|
def self.start(path)
|
19
|
-
|
20
|
+
pid = Process.pid
|
21
|
+
raise "debug socket thread already running for this process" if @thread && @pid == pid
|
22
|
+
|
23
|
+
@pid = pid
|
20
24
|
|
21
25
|
# make sure socket is only accessible to the process owner
|
22
26
|
old_mask = File.umask(0o0177)
|
@@ -51,6 +55,7 @@ module DebugSocket
|
|
51
55
|
@thread.kill if @thread
|
52
56
|
File.unlink(@path) if @path && File.exist?(@path)
|
53
57
|
@thread = nil
|
58
|
+
@pid = nil
|
54
59
|
@path = nil
|
55
60
|
end
|
56
61
|
|
data/lib/debug_socket/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: debug_socket
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Lazarus
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-03-20 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description:
|
14
14
|
email:
|