daemons 1.0.8 → 1.0.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (5) hide show
  1. data/README +1 -1
  2. data/Releases +4 -0
  3. data/lib/daemons.rb +1 -1
  4. data/lib/daemons/pid.rb +5 -3
  5. metadata +2 -2
data/README CHANGED
@@ -1,4 +1,4 @@
1
- = Daemons Version 1.0.8
1
+ = Daemons Version 1.0.9
2
2
 
3
3
  (See Releases for release-specific information)
4
4
 
data/Releases CHANGED
@@ -1,5 +1,9 @@
1
1
  = Daemons Release History
2
2
 
3
+ == Release 1.0.9: October 29, 2007
4
+
5
+ * fixed a severe bug in the new Pid.running? function: function returned true if the process did not exist (thanks to Jeremy Lawler).
6
+
3
7
  == Release 1.0.8: September 24, 2007
4
8
 
5
9
  * new Pid.running? function. Checking whether a process exists by sending signal '0' (thanks to Dru Nelson).
data/lib/daemons.rb CHANGED
@@ -65,7 +65,7 @@ require 'daemons/controller'
65
65
  #
66
66
  module Daemons
67
67
 
68
- VERSION = "1.0.8"
68
+ VERSION = "1.0.9"
69
69
 
70
70
  require 'daemons/daemonize'
71
71
 
data/lib/daemons/pid.rb CHANGED
@@ -9,14 +9,16 @@ module Daemons
9
9
  # Check if process is in existence
10
10
  # The simplest way to do this is to send signal '0'
11
11
  # (which is a single system call) that doesn't actually
12
- # sending a signal
12
+ # send a signal
13
13
  begin
14
14
  Process.kill(0, pid)
15
15
  return true
16
16
  rescue Errno::ESRCH
17
- return true
18
- rescue Errno::EPERM
19
17
  return false
18
+ rescue ::Exception # for example on EPERM (process exists but does not belong to us)
19
+ return true
20
+ #rescue Errno::EPERM
21
+ # return false
20
22
  end
21
23
  end
22
24
 
metadata CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.9.2
3
3
  specification_version: 1
4
4
  name: daemons
5
5
  version: !ruby/object:Gem::Version
6
- version: 1.0.8
7
- date: 2007-09-24 00:00:00 +02:00
6
+ version: 1.0.9
7
+ date: 2007-10-29 00:00:00 +01:00
8
8
  summary: A toolkit to create and control daemons in different ways
9
9
  require_paths:
10
10
  - lib