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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 17b967e5ea806bd2c6f2a7def92dd15da0d267fc
4
- data.tar.gz: 2e2fc8ad98d898e03eff7106a676ec55b9121887
3
+ metadata.gz: abe00f3deb97e3699634ffe4b3af947172f0cd36
4
+ data.tar.gz: 30102dbdc48a16069b4fd453da56136edd078a0b
5
5
  SHA512:
6
- metadata.gz: 9de0e91ee02d6e0ecbe2efe6fdac3f116f45320ec54028e37c8404c62faf3a89ad7e0400c561624c69b3ada36150241b621004651658145a7985283bafdbf511
7
- data.tar.gz: 15d0fbd7a02cd5fd5eeaca7a92353d3ef4a6b804d8e904613e75bc156d55efc2be702299facc216ae7dc96f08b502b93529ddf2097765c5fa821cb00d7dab8fe
6
+ metadata.gz: ce63a715f88dc69e06c8057f65c3e59b9f0478341cc78330c7eea82de5cd455cd44608c46bc26c5f949f07f8f5bea7e29cd1dca8fdbb4a1916be8e355d81327b
7
+ data.tar.gz: d12066f4d7de22b1709cdca8d667d74d97b874ab0b56bef7d88738ede719e5c0be1d787c7b710f93ff2d5416967fdee4bd6c9ffc3fbe2862dbca3e60d558f349
data/Releases CHANGED
@@ -1,5 +1,9 @@
1
1
  = Daemons Release History
2
2
 
3
+ == Release 1.2.3: June 25, 2015
4
+
5
+ * fix: ApplicationGroup now waits on subprocesses in start_all (thanks to tobithiel)
6
+
3
7
  == Release 1.2.2: March 17, 2015
4
8
 
5
9
  * fix 100% CPU usage bug when using monitor mode.
@@ -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)
@@ -1,3 +1,3 @@
1
1
  module Daemons
2
- VERSION = '1.2.2'
2
+ VERSION = '1.2.3'
3
3
  end
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.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