daemons 1.1.9 → 1.4.1
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.
- checksums.yaml +7 -0
- data/LICENSE +1 -1
- data/README.md +207 -0
- data/Releases +85 -24
- data/examples/call/call.rb +13 -16
- data/examples/call/call_monitor.rb +13 -17
- data/examples/daemonize/daemonize.rb +4 -8
- data/examples/run/ctrl_crash.rb +0 -1
- data/examples/run/ctrl_custom_logfiles.rb +18 -0
- data/examples/run/ctrl_exec.rb +0 -1
- data/examples/run/ctrl_exit.rb +0 -1
- data/examples/run/ctrl_keep_pid_files.rb +1 -3
- data/examples/run/ctrl_monitor.rb +0 -1
- data/examples/run/ctrl_monitor_multiple.rb +17 -0
- data/examples/run/ctrl_monitor_nocrash.rb +15 -0
- data/examples/run/ctrl_multiple.rb +0 -1
- data/examples/run/ctrl_ontop.rb +0 -1
- data/examples/run/ctrl_optionparser.rb +5 -7
- data/examples/run/ctrl_proc.rb +8 -9
- data/examples/run/ctrl_proc_multiple.rb +4 -6
- data/examples/run/ctrl_proc_rand.rb +2 -4
- data/examples/run/ctrl_proc_simple.rb +0 -1
- data/examples/run/myserver.rb +0 -1
- data/examples/run/myserver_crashing.rb +5 -5
- data/examples/run/myserver_exiting.rb +2 -2
- data/examples/run/myserver_hanging.rb +4 -5
- data/examples/run/myserver_slowstop.rb +5 -6
- data/lib/daemons/application.rb +235 -229
- data/lib/daemons/application_group.rb +115 -100
- data/lib/daemons/change_privilege.rb +2 -4
- data/lib/daemons/cmdline.rb +75 -62
- data/lib/daemons/controller.rb +36 -54
- data/lib/daemons/daemonize.rb +74 -75
- data/lib/daemons/etc_extension.rb +3 -4
- data/lib/daemons/exceptions.rb +11 -13
- data/lib/daemons/monitor.rb +57 -77
- data/lib/daemons/pid.rb +26 -56
- data/lib/daemons/pidfile.rb +49 -44
- data/lib/daemons/pidmem.rb +5 -9
- data/lib/daemons/reporter.rb +54 -0
- data/lib/daemons/syslogio.rb +240 -0
- data/lib/daemons/version.rb +3 -0
- data/lib/daemons.rb +87 -77
- metadata +111 -46
- data/README +0 -214
- data/Rakefile +0 -90
- data/TODO +0 -2
- data/setup.rb +0 -1360
data/lib/daemons.rb
CHANGED
@@ -1,19 +1,16 @@
|
|
1
1
|
require 'optparse'
|
2
2
|
require 'optparse/time'
|
3
3
|
|
4
|
-
|
5
|
-
require 'daemons/pidfile'
|
4
|
+
require 'daemons/version'
|
5
|
+
require 'daemons/pidfile'
|
6
6
|
require 'daemons/cmdline'
|
7
7
|
require 'daemons/exceptions'
|
8
8
|
require 'daemons/monitor'
|
9
9
|
|
10
|
-
|
11
10
|
require 'daemons/application'
|
12
11
|
require 'daemons/application_group'
|
13
12
|
require 'daemons/controller'
|
14
13
|
|
15
|
-
require 'timeout'
|
16
|
-
|
17
14
|
# All functions and classes that Daemons provides reside in this module.
|
18
15
|
#
|
19
16
|
# Daemons is normally invoked by one of the following four ways:
|
@@ -25,7 +22,7 @@ require 'timeout'
|
|
25
22
|
# to do anything useful.
|
26
23
|
#
|
27
24
|
# 2. <tt>Daemons.run_proc(app_name, options) { (...) }</tt>:
|
28
|
-
# This is used in wrapper-scripts that are supposed to control a proc.
|
25
|
+
# This is used in wrapper-scripts that are supposed to control a proc.
|
29
26
|
# Control is completely passed to the daemons library.
|
30
27
|
# Such wrapper scripts need to be invoked with command line options like 'start' or 'stop'
|
31
28
|
# to do anything useful.
|
@@ -50,7 +47,7 @@ require 'timeout'
|
|
50
47
|
# the potential of acquiring a controlling terminal.
|
51
48
|
# 4. Changes the current working directory to "/".
|
52
49
|
# 5. Clears the file creation mask (sets +umask+ to 0000).
|
53
|
-
# 6. Closes file descriptors (reopens +
|
50
|
+
# 6. Closes file descriptors (reopens +$stdout+ and +$stderr+ to point to a logfile if
|
54
51
|
# possible).
|
55
52
|
#
|
56
53
|
# So what does this mean for your daemons:
|
@@ -65,12 +62,8 @@ require 'timeout'
|
|
65
62
|
# called <i>PidFiles</i> are stored.
|
66
63
|
#
|
67
64
|
module Daemons
|
68
|
-
|
69
|
-
VERSION = "1.1.9"
|
70
|
-
|
71
65
|
require 'daemons/daemonize'
|
72
|
-
|
73
|
-
|
66
|
+
|
74
67
|
# Passes control to Daemons.
|
75
68
|
# This is used in wrapper-scripts that are supposed to control other ruby scripts or
|
76
69
|
# external applications. Control is completely passed to the daemons library.
|
@@ -82,7 +75,7 @@ module Daemons
|
|
82
75
|
# Also note that Daemons cannot detect the directory in which the controlling
|
83
76
|
# script resides, so this has to be either an absolute path or you have to run
|
84
77
|
# 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
|
78
|
+
# end with _monitor because that name is reserved for a monitor process which is
|
86
79
|
# there to restart your daemon if it crashes.
|
87
80
|
#
|
88
81
|
# +options+:: A hash that may contain one or more of the options listed below
|
@@ -97,44 +90,54 @@ module Daemons
|
|
97
90
|
# These are assumed to be separated by an array element '--', .e.g.
|
98
91
|
# ['start', 'f', '--', 'param1_for_script', 'param2_for_script'].
|
99
92
|
# If not given, ARGV (the parameters given to the Ruby process) will be used.
|
100
|
-
# <tt>:dir_mode</tt>:: Either <tt>:script</tt> (the directory for writing the pid files to
|
93
|
+
# <tt>:dir_mode</tt>:: Either <tt>:script</tt> (the directory for writing the pid files to
|
101
94
|
# given by <tt>:dir</tt> is interpreted relative
|
102
|
-
# to the script location given by +script+, the default) or <tt>:normal</tt> (the directory given by
|
103
|
-
# <tt>:dir</tt> is interpreted as a (absolute or relative) path) or <tt>:system</tt>
|
95
|
+
# to the script location given by +script+, the default) or <tt>:normal</tt> (the directory given by
|
96
|
+
# <tt>:dir</tt> is interpreted as a (absolute or relative) path) or <tt>:system</tt>
|
104
97
|
# (<tt>/var/run</tt> is used as the pid file directory)
|
105
98
|
#
|
106
99
|
# <tt>:dir</tt>:: Used in combination with <tt>:dir_mode</tt> (description above)
|
107
100
|
# <tt>:multiple</tt>:: Specifies whether multiple instances of the same script are allowed to run at the
|
108
101
|
# same time
|
109
|
-
# <tt>:
|
102
|
+
# <tt>:pid_delimiter</tt>:: Specifies the separator used when enumerating multiple process names/pid-files. Default is '_num'.
|
103
|
+
# <tt>:ontop</tt>:: When given (i.e. set to true), stay on top, i.e. do not daemonize the application
|
110
104
|
# (but the pid-file and other things are written as usual)
|
105
|
+
# <tt>:shush</tt>:: When given (i.e. set to true), turn on silent mode (no output to the terminal)
|
111
106
|
# <tt>:mode</tt>:: <tt>:load</tt> Load the script with <tt>Kernel.load</tt>;
|
112
107
|
# note that :stop_proc only works for the :load (and :proc) mode.
|
113
108
|
# <tt>:exec</tt> Execute the script file with <tt>Kernel.exec</tt>
|
114
|
-
# <tt>:backtrace</tt>:: Write a backtrace of the last exceptions to the file '[app_name].log' in the
|
109
|
+
# <tt>:backtrace</tt>:: Write a backtrace of the last exceptions to the file '[app_name].log' in the
|
115
110
|
# pid-file directory if the application exits due to an uncaught exception
|
116
111
|
# <tt>:monitor</tt>:: Monitor the programs and restart crashed instances
|
112
|
+
# <tt>:monitor_interval</tt>:: Interval in sesconds at which to check whether the instances are still running
|
117
113
|
# <tt>:log_dir</tt>:: A specific directory to put the log files into (when not given, resort to the default
|
118
114
|
# location as derived from the :dir_mode and :dir options
|
119
|
-
# <tt>:
|
115
|
+
# <tt>:logfilename</tt>:: Specifiy a custom log file name
|
116
|
+
# <tt>:log_output</tt>:: When given (i.e. set to true), redirect both $stdout and $stderr to a logfile named '[app_name].output' (or as given in :output_logfilename) in the pid-file directory
|
117
|
+
# <tt>:output_logfilename</tt>:: Specifiy a custom output redirection file name
|
118
|
+
# <tt>:log_output_syslog</tt>:: When set to true, redirect output into SYSLOG instead of the file. This overrides log_output setting.
|
120
119
|
# <tt>:keep_pid_files</tt>:: When given do not delete lingering pid-files (files for which the process is no longer running).
|
121
120
|
# <tt>:hard_exit</tt>:: When given use exit! to end a daemons instead of exit (this will for example
|
122
121
|
# not call at_exit handlers).
|
123
122
|
# <tt>:stop_proc</tt>:: A proc that will be called when the daemonized process receives a request to stop (works only for :load and :proc mode)
|
124
123
|
#
|
125
124
|
# -----
|
126
|
-
#
|
125
|
+
#
|
127
126
|
# === Example:
|
128
127
|
# options = {
|
129
|
-
# :app_name
|
130
|
-
# :ARGV
|
131
|
-
# :dir_mode
|
132
|
-
# :dir
|
133
|
-
# :multiple
|
134
|
-
# :
|
135
|
-
# :
|
136
|
-
# :
|
137
|
-
# :
|
128
|
+
# :app_name => "my_app",
|
129
|
+
# :ARGV => ['start', '-f', '--', 'param_for_myscript']
|
130
|
+
# :dir_mode => :script,
|
131
|
+
# :dir => 'pids',
|
132
|
+
# :multiple => true,
|
133
|
+
# :pid_delimiter => '.n',
|
134
|
+
# :ontop => true,
|
135
|
+
# :shush => false,
|
136
|
+
# :mode => :exec,
|
137
|
+
# :backtrace => true,
|
138
|
+
# :monitor => true,
|
139
|
+
# :logfilename => 'custom_logfile.log',
|
140
|
+
# :output_logfilename => 'custom_outputfile.txt'
|
138
141
|
# }
|
139
142
|
#
|
140
143
|
# Daemons.run(File.join(File.dirname(__FILE__), 'myscript.rb'), options)
|
@@ -142,17 +145,16 @@ module Daemons
|
|
142
145
|
def run(script, options = {})
|
143
146
|
options[:script] = script
|
144
147
|
@controller = Controller.new(options, options[:ARGV] || ARGV)
|
145
|
-
|
146
|
-
@controller.catch_exceptions
|
148
|
+
|
149
|
+
@controller.catch_exceptions do
|
147
150
|
@controller.run
|
148
|
-
|
149
|
-
|
151
|
+
end
|
152
|
+
|
150
153
|
# I don't think anybody will ever use @group, as this location should not be reached under non-error conditions
|
151
154
|
@group = @controller.group
|
152
155
|
end
|
153
156
|
module_function :run
|
154
|
-
|
155
|
-
|
157
|
+
|
156
158
|
# Passes control to Daemons.
|
157
159
|
# This function does the same as Daemons.run except that not a script but a proc
|
158
160
|
# will be run as a daemon while this script provides command line options like 'start' or 'stop'
|
@@ -162,13 +164,13 @@ module Daemons
|
|
162
164
|
# used to contruct the name of the pid files
|
163
165
|
# and log files. Defaults to the basename of
|
164
166
|
# the script.
|
165
|
-
#
|
167
|
+
#
|
166
168
|
# +options+:: A hash that may contain one or more of the options listed in the documentation for Daemons.run
|
167
169
|
#
|
168
170
|
# A block must be given to this function. The block will be used as the :proc entry in the options hash.
|
169
171
|
#
|
170
172
|
# -----
|
171
|
-
#
|
173
|
+
#
|
172
174
|
# === Example:
|
173
175
|
#
|
174
176
|
# Daemons.run_proc('myproc.rb') do
|
@@ -184,25 +186,24 @@ module Daemons
|
|
184
186
|
options[:app_name] = app_name
|
185
187
|
options[:mode] = :proc
|
186
188
|
options[:proc] = block
|
187
|
-
|
189
|
+
|
188
190
|
# we do not have a script location so the the :script :dir_mode cannot be used, change it to :normal
|
189
191
|
if [nil, :script].include? options[:dir_mode]
|
190
192
|
options[:dir_mode] = :normal
|
191
193
|
options[:dir] ||= File.expand_path('.')
|
192
194
|
end
|
193
|
-
|
195
|
+
|
194
196
|
@controller = Controller.new(options, options[:ARGV] || ARGV)
|
195
|
-
|
196
|
-
@controller.catch_exceptions
|
197
|
+
|
198
|
+
@controller.catch_exceptions do
|
197
199
|
@controller.run
|
198
|
-
|
199
|
-
|
200
|
+
end
|
201
|
+
|
200
202
|
# I don't think anybody will ever use @group, as this location should not be reached under non-error conditions
|
201
203
|
@group = @controller.group
|
202
204
|
end
|
203
205
|
module_function :run_proc
|
204
|
-
|
205
|
-
|
206
|
+
|
206
207
|
# Execute the block in a new daemon. <tt>Daemons.call</tt> will return immediately
|
207
208
|
# after spawning the daemon with the new Application object as a return value.
|
208
209
|
#
|
@@ -215,11 +216,13 @@ module Daemons
|
|
215
216
|
# === Options:
|
216
217
|
# <tt>:multiple</tt>:: Specifies whether multiple instances of the same script are allowed to run at the
|
217
218
|
# same time
|
218
|
-
# <tt>:
|
219
|
-
# <tt>:
|
219
|
+
# <tt>:monitor</tt>:: Monitor the programs and restart crashed instances
|
220
|
+
# <tt>:monitor_interval</tt>:: Interval in sesconds at which to check whether the instances are still running
|
221
|
+
# <tt>:ontop</tt>:: When given, stay on top, i.e. do not daemonize the application
|
222
|
+
# <tt>:backtrace</tt>:: Write a backtrace of the last exceptions to the file '[app_name].log' in the
|
220
223
|
# pid-file directory if the application exits due to an uncaught exception
|
221
224
|
# -----
|
222
|
-
#
|
225
|
+
#
|
223
226
|
# === Example:
|
224
227
|
# options = {
|
225
228
|
# :app_name => "myproc",
|
@@ -237,49 +240,52 @@ module Daemons
|
|
237
240
|
# end
|
238
241
|
#
|
239
242
|
def call(options = {}, &block)
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
243
|
+
new_app = Daemons.new(options, &block)
|
244
|
+
new_app.start
|
245
|
+
new_app
|
246
|
+
end
|
247
|
+
module_function :call
|
248
|
+
|
249
|
+
# Create a new Daemon application, like <tt>Daemons.call</tt>, but will not start it automatically
|
250
|
+
def new(options = {}, &block)
|
251
|
+
fail 'Daemons.call: no block given' unless block_given?
|
252
|
+
|
247
253
|
options[:app_name] ||= 'proc'
|
248
|
-
|
254
|
+
options[:proc] = Proc.new(&block)
|
255
|
+
options[:mode] = :proc
|
256
|
+
options[:dir_mode] = :normal
|
257
|
+
|
249
258
|
@group ||= ApplicationGroup.new(options[:app_name], options)
|
250
|
-
|
251
|
-
new_app = @group.new_application(options)
|
252
|
-
new_app.start
|
253
259
|
|
254
|
-
|
260
|
+
@group.new_application(options)
|
255
261
|
end
|
256
|
-
module_function :
|
257
|
-
|
258
|
-
|
262
|
+
module_function :new
|
263
|
+
|
259
264
|
# Daemonize the currently runnig process, i.e. the calling process will become a daemon.
|
260
265
|
#
|
261
266
|
# +options+:: A hash that may contain one or more of the options listed below
|
262
267
|
#
|
263
268
|
# === Options:
|
264
|
-
# <tt>:ontop</tt>:: When given, stay on top, i.e. do not daemonize the application
|
265
|
-
# <tt>:backtrace</tt>:: Write a backtrace of the last exceptions to the file '[app_name].log' in the
|
269
|
+
# <tt>:ontop</tt>:: When given, stay on top, i.e. do not daemonize the application
|
270
|
+
# <tt>:backtrace</tt>:: Write a backtrace of the last exceptions to the file '[app_name].log' in the
|
266
271
|
# pid-file directory if the application exits due to an uncaught exception
|
267
272
|
# <tt>:app_name</tt>:: The name of the application. This will be
|
268
273
|
# used to contruct the name of the pid files
|
269
274
|
# and log files. Defaults to the basename of
|
270
275
|
# the script.
|
271
|
-
# <tt>:dir_mode</tt>:: Either <tt>:script</tt> (the directory for writing files to
|
276
|
+
# <tt>:dir_mode</tt>:: Either <tt>:script</tt> (the directory for writing files to
|
272
277
|
# given by <tt>:dir</tt> is interpreted relative
|
273
|
-
# to the script location given by +script+, the default) or <tt>:normal</tt> (the directory given by
|
274
|
-
# <tt>:dir</tt> is interpreted as a (absolute or relative) path) or <tt>:system</tt>
|
278
|
+
# to the script location given by +script+, the default) or <tt>:normal</tt> (the directory given by
|
279
|
+
# <tt>:dir</tt> is interpreted as a (absolute or relative) path) or <tt>:system</tt>
|
275
280
|
# (<tt>/var/run</tt> is used as the file directory)
|
276
281
|
#
|
277
282
|
# <tt>:dir</tt>:: Used in combination with <tt>:dir_mode</tt> (description above)
|
278
283
|
# <tt>:log_dir</tt>:: A specific directory to put the log files into (when not given, resort to the default
|
279
284
|
# location as derived from the :dir_mode and :dir options
|
280
|
-
# <tt>:log_output</tt>:: When given (i.e. set to true), redirect both
|
285
|
+
# <tt>:log_output</tt>:: When given (i.e. set to true), redirect both $stdout and $stdout to a logfile named '[app_name].output' in the pid-file directory
|
286
|
+
# <tt>:log_output_syslog</tt>:: When set to true, redirect output into SYSLOG instead of the file. This overrides log_output setting.
|
281
287
|
# -----
|
282
|
-
#
|
288
|
+
#
|
283
289
|
# === Example:
|
284
290
|
# options = {
|
285
291
|
# :backtrace => true,
|
@@ -298,18 +304,22 @@ module Daemons
|
|
298
304
|
#
|
299
305
|
def daemonize(options = {})
|
300
306
|
options[:script] ||= File.basename(__FILE__)
|
301
|
-
|
307
|
+
|
302
308
|
@group ||= ApplicationGroup.new(options[:app_name] || options[:script], options)
|
303
|
-
|
309
|
+
|
304
310
|
@group.new_application(:mode => :none).start
|
305
311
|
end
|
306
312
|
module_function :daemonize
|
307
|
-
|
313
|
+
|
308
314
|
# Return the internal ApplicationGroup instance.
|
309
|
-
def group
|
315
|
+
def group
|
316
|
+
@group
|
317
|
+
end
|
310
318
|
module_function :group
|
311
|
-
|
319
|
+
|
312
320
|
# Return the internal Controller instance.
|
313
|
-
def controller
|
321
|
+
def controller
|
322
|
+
@controller
|
323
|
+
end
|
314
324
|
module_function :controller
|
315
|
-
end
|
325
|
+
end
|
metadata
CHANGED
@@ -1,56 +1,108 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: daemons
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1
|
5
|
-
prerelease:
|
4
|
+
version: 1.4.1
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Thomas Uehlinger
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date:
|
13
|
-
dependencies:
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
11
|
+
date: 2021-08-26 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: rake
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '12.3'
|
20
|
+
- - ">="
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: 12.3.3
|
23
|
+
type: :development
|
24
|
+
prerelease: false
|
25
|
+
version_requirements: !ruby/object:Gem::Requirement
|
26
|
+
requirements:
|
27
|
+
- - "~>"
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '12.3'
|
30
|
+
- - ">="
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: 12.3.3
|
33
|
+
- !ruby/object:Gem::Dependency
|
34
|
+
name: rspec
|
35
|
+
requirement: !ruby/object:Gem::Requirement
|
36
|
+
requirements:
|
37
|
+
- - "~>"
|
38
|
+
- !ruby/object:Gem::Version
|
39
|
+
version: '3.1'
|
40
|
+
type: :development
|
41
|
+
prerelease: false
|
42
|
+
version_requirements: !ruby/object:Gem::Requirement
|
43
|
+
requirements:
|
44
|
+
- - "~>"
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: '3.1'
|
47
|
+
- !ruby/object:Gem::Dependency
|
48
|
+
name: simplecov
|
49
|
+
requirement: !ruby/object:Gem::Requirement
|
50
|
+
requirements:
|
51
|
+
- - "~>"
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: '0'
|
54
|
+
type: :development
|
55
|
+
prerelease: false
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
requirements:
|
58
|
+
- - "~>"
|
59
|
+
- !ruby/object:Gem::Version
|
60
|
+
version: '0'
|
61
|
+
- !ruby/object:Gem::Dependency
|
62
|
+
name: pry-byebug
|
63
|
+
requirement: !ruby/object:Gem::Requirement
|
64
|
+
requirements:
|
65
|
+
- - "~>"
|
66
|
+
- !ruby/object:Gem::Version
|
67
|
+
version: '3.0'
|
68
|
+
type: :development
|
69
|
+
prerelease: false
|
70
|
+
version_requirements: !ruby/object:Gem::Requirement
|
71
|
+
requirements:
|
72
|
+
- - "~>"
|
73
|
+
- !ruby/object:Gem::Version
|
74
|
+
version: '3.0'
|
75
|
+
description: |2
|
76
|
+
Daemons provides an easy way to wrap existing ruby scripts (for example a
|
77
|
+
self-written server) to be run as a daemon and to be controlled by simple
|
78
|
+
start/stop/restart commands.
|
79
|
+
|
80
|
+
You can also call blocks as daemons and control them from the parent or just
|
81
|
+
daemonize the current process.
|
82
|
+
|
83
|
+
Besides this basic functionality, daemons offers many advanced features like
|
84
|
+
exception backtracing and logging (in case your ruby script crashes) and
|
85
|
+
monitoring and automatic restarting of your processes if they crash.
|
86
|
+
email: thomas.uehinger@gmail.com
|
22
87
|
executables: []
|
23
88
|
extensions: []
|
24
|
-
extra_rdoc_files:
|
25
|
-
- README
|
26
|
-
- Releases
|
27
|
-
- TODO
|
89
|
+
extra_rdoc_files: []
|
28
90
|
files:
|
29
|
-
- Rakefile
|
30
|
-
- Releases
|
31
|
-
- TODO
|
32
|
-
- README
|
33
91
|
- LICENSE
|
34
|
-
-
|
35
|
-
-
|
36
|
-
-
|
37
|
-
-
|
38
|
-
-
|
39
|
-
- lib/daemons/cmdline.rb
|
40
|
-
- lib/daemons/controller.rb
|
41
|
-
- lib/daemons/daemonize.rb
|
42
|
-
- lib/daemons/etc_extension.rb
|
43
|
-
- lib/daemons/exceptions.rb
|
44
|
-
- lib/daemons/monitor.rb
|
45
|
-
- lib/daemons/pid.rb
|
46
|
-
- lib/daemons/pidfile.rb
|
47
|
-
- lib/daemons/pidmem.rb
|
92
|
+
- README.md
|
93
|
+
- Releases
|
94
|
+
- examples/call/call.rb
|
95
|
+
- examples/call/call_monitor.rb
|
96
|
+
- examples/daemonize/daemonize.rb
|
48
97
|
- examples/run/ctrl_crash.rb
|
98
|
+
- examples/run/ctrl_custom_logfiles.rb
|
49
99
|
- examples/run/ctrl_exec.rb
|
50
100
|
- examples/run/ctrl_exit.rb
|
51
101
|
- examples/run/ctrl_hanging.rb
|
52
102
|
- examples/run/ctrl_keep_pid_files.rb
|
53
103
|
- examples/run/ctrl_monitor.rb
|
104
|
+
- examples/run/ctrl_monitor_multiple.rb
|
105
|
+
- examples/run/ctrl_monitor_nocrash.rb
|
54
106
|
- examples/run/ctrl_multiple.rb
|
55
107
|
- examples/run/ctrl_normal.rb
|
56
108
|
- examples/run/ctrl_ontop.rb
|
@@ -65,31 +117,44 @@ files:
|
|
65
117
|
- examples/run/myserver_exiting.rb
|
66
118
|
- examples/run/myserver_hanging.rb
|
67
119
|
- examples/run/myserver_slowstop.rb
|
68
|
-
-
|
69
|
-
-
|
70
|
-
-
|
71
|
-
|
72
|
-
|
120
|
+
- lib/daemons.rb
|
121
|
+
- lib/daemons/application.rb
|
122
|
+
- lib/daemons/application_group.rb
|
123
|
+
- lib/daemons/change_privilege.rb
|
124
|
+
- lib/daemons/cmdline.rb
|
125
|
+
- lib/daemons/controller.rb
|
126
|
+
- lib/daemons/daemonize.rb
|
127
|
+
- lib/daemons/etc_extension.rb
|
128
|
+
- lib/daemons/exceptions.rb
|
129
|
+
- lib/daemons/monitor.rb
|
130
|
+
- lib/daemons/pid.rb
|
131
|
+
- lib/daemons/pidfile.rb
|
132
|
+
- lib/daemons/pidmem.rb
|
133
|
+
- lib/daemons/reporter.rb
|
134
|
+
- lib/daemons/syslogio.rb
|
135
|
+
- lib/daemons/version.rb
|
136
|
+
homepage: https://github.com/thuehlinger/daemons
|
137
|
+
licenses:
|
138
|
+
- MIT
|
139
|
+
metadata:
|
140
|
+
documentation_uri: http://www.rubydoc.info/gems/daemons
|
73
141
|
post_install_message:
|
74
142
|
rdoc_options: []
|
75
143
|
require_paths:
|
76
144
|
- lib
|
77
145
|
required_ruby_version: !ruby/object:Gem::Requirement
|
78
|
-
none: false
|
79
146
|
requirements:
|
80
|
-
- -
|
147
|
+
- - ">="
|
81
148
|
- !ruby/object:Gem::Version
|
82
149
|
version: '0'
|
83
150
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
84
|
-
none: false
|
85
151
|
requirements:
|
86
|
-
- -
|
152
|
+
- - ">="
|
87
153
|
- !ruby/object:Gem::Version
|
88
154
|
version: '0'
|
89
155
|
requirements: []
|
90
|
-
|
91
|
-
rubygems_version: 1.8.23
|
156
|
+
rubygems_version: 3.0.3
|
92
157
|
signing_key:
|
93
|
-
specification_version:
|
158
|
+
specification_version: 4
|
94
159
|
summary: A toolkit to create and control daemons in different ways
|
95
160
|
test_files: []
|