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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 14eca78815c548cdb4782e8cda4588b6d7b66951
4
- data.tar.gz: 457c0294ab9f9be83b45bb57ecc99784878c9882
3
+ metadata.gz: a609fdc91513a829e00043448a126f8e872efa1a
4
+ data.tar.gz: d692816e0c4ac345f71be7b987d6369ff30e7887
5
5
  SHA512:
6
- metadata.gz: f35b1bef6088c4693197602a2d7951408f242fd6eb6ab1bc3f11c7dc520b0de51607002fa2a185112871529f89f916a41759a74174657eb88e02b411801a07d8
7
- data.tar.gz: 971bd7cece3daf3110e01edac0c599f524993f1ac56ef9eb94215d853f39cfe336580ab97b644dea57afee3904dde1d33b39b041c1f0226e4609fd8e07ede0d9
6
+ metadata.gz: b39b0daf4e4998e7d6fe92eab39c3253ddfe4a0b92be293e3e2b455f70ba133879da752ad3c36b290aa282fd17d6e86351b92bef1ec9e0e3d9f7a4d17088aea7
7
+ data.tar.gz: 7bdfe79335aa5fd018d9dedd6767126abd05e1ea79ccebc4b278cc8f90b1e220225eb935c4c7e908e55207419d1e54c89f1bfcd0665ade650e4d64310eb7eb35
@@ -2,7 +2,7 @@ language: ruby
2
2
  rvm:
3
3
  - 2.3.3
4
4
  - 2.4.0
5
- - jruby-9.1.7.0
5
+ - jruby-9.1.8.0
6
6
  - ruby-head
7
7
  matrix:
8
8
  allow_failures:
data/CHANGES.md CHANGED
@@ -1,3 +1,6 @@
1
+ ### 0.1.4 2017-03-17
2
+ - Allow forked children to open their own debug sockets
3
+
1
4
  ### 0.1.3 2017-02-23
2
5
  - Handle syntax errors (and other errors that do not inherit from StandardError) in eval.
3
6
  - Cleanup logging and change log message format
@@ -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
- raise "debug socket thread already running" if @thread
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
 
@@ -1,3 +1,3 @@
1
1
  module DebugSocket
2
- VERSION = "0.1.3".freeze
2
+ VERSION = "0.1.4".freeze
3
3
  end
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.3
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-02-23 00:00:00.000000000 Z
11
+ date: 2017-03-20 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description:
14
14
  email: