daemons 1.1.5 → 1.1.6

Sign up to get free protection for your applications and to get access to all the features.
data/LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2005-2011 Thomas Uehlinger
1
+ Copyright (c) 2005-2012 Thomas Uehlinger
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person
4
4
  obtaining a copy of this software and associated documentation
data/README CHANGED
@@ -1,4 +1,4 @@
1
- = Daemons Version 1.1.5
1
+ = Daemons Version 1.1.6
2
2
 
3
3
  (See Releases for release-specific information)
4
4
 
data/Rakefile CHANGED
File without changes
data/Releases CHANGED
@@ -1,5 +1,9 @@
1
1
  = Daemons Release History
2
2
 
3
+ == Release 1.1.6: January 18, 2012
4
+
5
+ * Add the :app_name option for the "call" daemonization mode.
6
+
3
7
  == Release 1.1.5: December 19, 2011
4
8
 
5
9
  * Catch the case where the pidfile is empty but not deleted
data/TODO CHANGED
File without changes
@@ -18,6 +18,7 @@ testfile = File.expand_path(__FILE__) + '.log'
18
18
  #
19
19
 
20
20
  options = {
21
+ :app_name => 'mytask',
21
22
  # :ontop => true,
22
23
  :multiple => true
23
24
  }
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
data/lib/daemons.rb CHANGED
@@ -27,7 +27,7 @@ require 'timeout'
27
27
  # 2. <tt>Daemons.run_proc(app_name, options) { (...) }</tt>:
28
28
  # This is used in wrapper-scripts that are supposed to control a proc.
29
29
  # Control is completely passed to the daemons library.
30
- # Such wrapper script need to be invoked with command line options like 'start' or 'stop'
30
+ # Such wrapper scripts need to be invoked with command line options like 'start' or 'stop'
31
31
  # to do anything useful.
32
32
  #
33
33
  # 3. <tt>Daemons.call(options) { block }</tt>:
@@ -66,7 +66,7 @@ require 'timeout'
66
66
  #
67
67
  module Daemons
68
68
 
69
- VERSION = "1.1.5"
69
+ VERSION = "1.1.6"
70
70
 
71
71
  require 'daemons/daemonize'
72
72
 
@@ -81,7 +81,9 @@ module Daemons
81
81
  # Please note that Daemons runs this script with <tt>load <script></tt>.
82
82
  # Also note that Daemons cannot detect the directory in which the controlling
83
83
  # script resides, so this has to be either an absolute path or you have to run
84
- # the controlling script from the appropriate directory.
84
+ # the controlling script from the appropriate directory. Your script name should not
85
+ # end with _monitor because that name is reserved for a monitor process which is
86
+ # there to restart your daemon if it crashes.
85
87
  #
86
88
  # +options+:: A hash that may contain one or more of the options listed below
87
89
  #
@@ -204,6 +206,8 @@ module Daemons
204
206
  # Execute the block in a new daemon. <tt>Daemons.call</tt> will return immediately
205
207
  # after spawning the daemon with the new Application object as a return value.
206
208
  #
209
+ # +app_name+:: The name of the application.
210
+ #
207
211
  # +options+:: A hash that may contain one or more of the options listed below
208
212
  #
209
213
  # +block+:: The block to call in the daemon.
@@ -218,6 +222,7 @@ module Daemons
218
222
  #
219
223
  # === Example:
220
224
  # options = {
225
+ # :app_name => "myproc",
221
226
  # :backtrace => true,
222
227
  # :monitor => true,
223
228
  # :ontop => true
@@ -239,7 +244,9 @@ module Daemons
239
244
  options[:proc] = block
240
245
  options[:mode] = :proc
241
246
 
242
- @group ||= ApplicationGroup.new('proc', options)
247
+ options[:app_name] ||= 'proc'
248
+
249
+ @group ||= ApplicationGroup.new(options[:app_name], options)
243
250
 
244
251
  new_app = @group.new_application(options)
245
252
  new_app.start
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
data/lib/daemons/pid.rb CHANGED
File without changes
File without changes
File without changes
data/setup.rb CHANGED
File without changes
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 1
7
7
  - 1
8
- - 5
9
- version: 1.1.5
8
+ - 6
9
+ version: 1.1.6
10
10
  platform: ruby
11
11
  authors:
12
12
  - Thomas Uehlinger