daemons 1.0.8 → 1.0.9
Sign up to get free protection for your applications and to get access to all the features.
- data/README +1 -1
- data/Releases +4 -0
- data/lib/daemons.rb +1 -1
- data/lib/daemons/pid.rb +5 -3
- metadata +2 -2
data/README
CHANGED
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
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
|
-
#
|
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.
|
7
|
-
date: 2007-
|
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
|