daemons 1.2.2 → 1.2.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Releases +4 -0
- data/examples/run/ctrl_monitor_nocrash.rb +15 -0
- data/lib/daemons/application_group.rb +3 -1
- data/lib/daemons/version.rb +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: abe00f3deb97e3699634ffe4b3af947172f0cd36
|
4
|
+
data.tar.gz: 30102dbdc48a16069b4fd453da56136edd078a0b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ce63a715f88dc69e06c8057f65c3e59b9f0478341cc78330c7eea82de5cd455cd44608c46bc26c5f949f07f8f5bea7e29cd1dca8fdbb4a1916be8e355d81327b
|
7
|
+
data.tar.gz: d12066f4d7de22b1709cdca8d667d74d97b874ab0b56bef7d88738ede719e5c0be1d787c7b710f93ff2d5416967fdee4bd6c9ffc3fbe2862dbca3e60d558f349
|
data/Releases
CHANGED
@@ -0,0 +1,15 @@
|
|
1
|
+
lib_dir = File.expand_path(File.join(File.dirname(__FILE__), '../../lib'))
|
2
|
+
|
3
|
+
if File.exist?(File.join(lib_dir, 'daemons.rb'))
|
4
|
+
$LOAD_PATH.unshift lib_dir
|
5
|
+
else
|
6
|
+
begin; require 'rubygems'; rescue ::Exception; end
|
7
|
+
end
|
8
|
+
|
9
|
+
require 'daemons'
|
10
|
+
|
11
|
+
options = {
|
12
|
+
:monitor => true
|
13
|
+
}
|
14
|
+
|
15
|
+
Daemons.run(File.join(File.dirname(__FILE__), 'myserver.rb'), options)
|
@@ -146,11 +146,13 @@ module Daemons
|
|
146
146
|
@monitor.stop if @monitor
|
147
147
|
@monitor = nil
|
148
148
|
|
149
|
+
pids = []
|
149
150
|
@applications.each do |a|
|
150
|
-
fork do
|
151
|
+
pids << fork do
|
151
152
|
a.start
|
152
153
|
end
|
153
154
|
end
|
155
|
+
pids.each { |pid| Process.waitpid(pid) }
|
154
156
|
end
|
155
157
|
|
156
158
|
def stop_all(no_wait = false)
|
data/lib/daemons/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: daemons
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Thomas Uehlinger
|
@@ -40,6 +40,7 @@ files:
|
|
40
40
|
- examples/run/ctrl_keep_pid_files.rb
|
41
41
|
- examples/run/ctrl_monitor.rb
|
42
42
|
- examples/run/ctrl_monitor_multiple.rb
|
43
|
+
- examples/run/ctrl_monitor_nocrash.rb
|
43
44
|
- examples/run/ctrl_multiple.rb
|
44
45
|
- examples/run/ctrl_normal.rb
|
45
46
|
- examples/run/ctrl_ontop.rb
|