blue-daemons 1.1.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +1 -0
- data/Gemfile +4 -0
- data/Gemfile.lock +27 -0
- data/LICENSE +22 -0
- data/README-mlanett.rdoc +8 -0
- data/README.rdoc +214 -0
- data/Rakefile +32 -0
- data/Releases +201 -0
- data/TODO +2 -0
- data/daemons.gemspec +27 -0
- data/examples/call/call.rb +57 -0
- data/examples/call/call.rb.log +1 -0
- data/examples/call/call_monitor.rb +55 -0
- data/examples/daemonize/daemonize.rb +27 -0
- data/examples/run/ctrl_crash.rb +17 -0
- data/examples/run/ctrl_exec.rb +16 -0
- data/examples/run/ctrl_exit.rb +15 -0
- data/examples/run/ctrl_hanging.rb +19 -0
- data/examples/run/ctrl_keep_pid_files.rb +17 -0
- data/examples/run/ctrl_monitor.rb +16 -0
- data/examples/run/ctrl_monitor_multiple.rb +18 -0
- data/examples/run/ctrl_multiple.rb +16 -0
- data/examples/run/ctrl_normal.rb +11 -0
- data/examples/run/ctrl_ontop.rb +16 -0
- data/examples/run/ctrl_optionparser.rb +43 -0
- data/examples/run/ctrl_proc.rb +25 -0
- data/examples/run/ctrl_proc.rb.output +121 -0
- data/examples/run/ctrl_proc_multiple.rb +22 -0
- data/examples/run/ctrl_proc_multiple.rb.output +2 -0
- data/examples/run/ctrl_proc_rand.rb +23 -0
- data/examples/run/ctrl_proc_simple.rb +17 -0
- data/examples/run/ctrl_slowstop.rb +16 -0
- data/examples/run/myserver.rb +12 -0
- data/examples/run/myserver_crashing.rb +14 -0
- data/examples/run/myserver_exiting.rb +8 -0
- data/examples/run/myserver_hanging.rb +21 -0
- data/examples/run/myserver_slowstop.rb +21 -0
- data/lib/daemons.rb +312 -0
- data/lib/daemons/application.rb +481 -0
- data/lib/daemons/application_group.rb +200 -0
- data/lib/daemons/change_privilege.rb +19 -0
- data/lib/daemons/cmdline.rb +121 -0
- data/lib/daemons/controller.rb +140 -0
- data/lib/daemons/daemonize.rb +182 -0
- data/lib/daemons/etc_extension.rb +12 -0
- data/lib/daemons/exceptions.rb +31 -0
- data/lib/daemons/monitor.rb +144 -0
- data/lib/daemons/pid.rb +114 -0
- data/lib/daemons/pidfile.rb +118 -0
- data/lib/daemons/pidmem.rb +19 -0
- data/lib/daemons/version.rb +3 -0
- data/setup.rb +1360 -0
- data/spec/pidfile_spec.rb +12 -0
- data/spec/spec_helper.rb +1 -0
- metadata +146 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 3030e18920c56f62c8b4319430381fb4460ee6e0
|
4
|
+
data.tar.gz: 482a982efb8af7f709c4bd6cff3be016dc2c27ac
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: bc67c3daa5b1e17dcfa744c7a11f42a0c450e6cdb5dec130cf78917678f73863a45bf321c7df1718aefe8d2d925030b915e1dc192836f4597fd94813fb9d3f02
|
7
|
+
data.tar.gz: c1abbc99345b0bdc9761879b5d9ee7b09fd8cfae51c3eff6ecc7eb09f370b8b81ee52f62d7275e97f0475508820cc47a32b1e7d85276f9550f0a864b5df0a370
|
data/.gitignore
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
pkg/*
|
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,27 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
blue-daemons (1.1.11)
|
5
|
+
|
6
|
+
GEM
|
7
|
+
remote: https://rubygems.org/
|
8
|
+
specs:
|
9
|
+
diff-lcs (1.2.4)
|
10
|
+
rake (10.1.0)
|
11
|
+
rspec (2.14.1)
|
12
|
+
rspec-core (~> 2.14.0)
|
13
|
+
rspec-expectations (~> 2.14.0)
|
14
|
+
rspec-mocks (~> 2.14.0)
|
15
|
+
rspec-core (2.14.5)
|
16
|
+
rspec-expectations (2.14.3)
|
17
|
+
diff-lcs (>= 1.1.3, < 2.0)
|
18
|
+
rspec-mocks (2.14.3)
|
19
|
+
|
20
|
+
PLATFORMS
|
21
|
+
ruby
|
22
|
+
|
23
|
+
DEPENDENCIES
|
24
|
+
blue-daemons!
|
25
|
+
bundler (>= 1.0)
|
26
|
+
rake
|
27
|
+
rspec
|
data/LICENSE
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2005-2012 Thomas Uehlinger
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person
|
4
|
+
obtaining a copy of this software and associated documentation
|
5
|
+
files (the "Software"), to deal in the Software without
|
6
|
+
restriction, including without limitation the rights to use,
|
7
|
+
copy, modify, merge, publish, distribute, sublicense, and/or sell
|
8
|
+
copies of the Software, and to permit persons to whom the
|
9
|
+
Software is furnished to do so, subject to the following
|
10
|
+
conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be
|
13
|
+
included in all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
16
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
17
|
+
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
18
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
19
|
+
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
20
|
+
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
21
|
+
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
22
|
+
OTHER DEALINGS IN THE SOFTWARE.
|
data/README-mlanett.rdoc
ADDED
@@ -0,0 +1,8 @@
|
|
1
|
+
== What is Daemons?
|
2
|
+
|
3
|
+
This is a fork of the original svn upstream by Thomas Uehlinger.
|
4
|
+
|
5
|
+
It incorporates some bug fixes from myself and some other git repos,
|
6
|
+
which are forked from an older version of the upstream.
|
7
|
+
|
8
|
+
This gem is pushed to rubygems as mlanett-daemons.
|
data/README.rdoc
ADDED
@@ -0,0 +1,214 @@
|
|
1
|
+
= Daemons Version 1.1.10
|
2
|
+
|
3
|
+
(See Releases for release-specific information)
|
4
|
+
|
5
|
+
== What is Daemons?
|
6
|
+
|
7
|
+
Daemons provides an easy way to wrap existing ruby scripts (for example a self-written server)
|
8
|
+
to be <i>run as a daemon</i> and to be <i>controlled by simple start/stop/restart commands</i>.
|
9
|
+
|
10
|
+
If you want, you can also use daemons to <i>run blocks of ruby code in a daemon process</i> and to control
|
11
|
+
these processes from the main application.
|
12
|
+
|
13
|
+
Besides this basic functionality, daemons offers many advanced features like <i>exception backtracing</i>
|
14
|
+
and logging (in case your ruby script crashes) and <i>monitoring</i> and automatic restarting of your processes
|
15
|
+
if they crash.
|
16
|
+
|
17
|
+
== Basic Usage
|
18
|
+
|
19
|
+
You can use Daemons in four different ways:
|
20
|
+
|
21
|
+
=== 1. Create wrapper scripts for your server scripts or applications
|
22
|
+
|
23
|
+
Layout: suppose you have your self-written server <tt>myserver.rb</tt>:
|
24
|
+
|
25
|
+
# this is myserver.rb
|
26
|
+
# it does nothing really useful at the moment
|
27
|
+
|
28
|
+
loop do
|
29
|
+
sleep(5)
|
30
|
+
end
|
31
|
+
|
32
|
+
To use <tt>myserver.rb</tt> in a production environment, you need to be able to
|
33
|
+
run <tt>myserver.rb</tt> in the _background_ (this means detach it from the console, fork it
|
34
|
+
in the background, release all directories and file descriptors).
|
35
|
+
|
36
|
+
Just create <tt>myserver_control.rb</tt> like this:
|
37
|
+
|
38
|
+
# this is myserver_control.rb
|
39
|
+
|
40
|
+
require 'rubygems' # if you use RubyGems
|
41
|
+
require 'daemons'
|
42
|
+
|
43
|
+
Daemons.run('myserver.rb')
|
44
|
+
|
45
|
+
And use it like this from the console:
|
46
|
+
|
47
|
+
$ ruby myserver_control.rb start
|
48
|
+
(myserver.rb is now running in the background)
|
49
|
+
$ ruby myserver_control.rb restart
|
50
|
+
(...)
|
51
|
+
$ ruby myserver_control.rb stop
|
52
|
+
|
53
|
+
For testing purposes you can even run <tt>myserver.rb</tt> <i>without forking</i> in the background:
|
54
|
+
|
55
|
+
$ ruby myserver_control.rb run
|
56
|
+
|
57
|
+
An additional nice feature of Daemons is that you can pass <i>additional arguments</i> to the script that
|
58
|
+
should be daemonized by seperating them by two _hyphens_:
|
59
|
+
|
60
|
+
$ ruby myserver_control.rb start -- --file=anyfile --a_switch another_argument
|
61
|
+
|
62
|
+
|
63
|
+
=== 2. Create wrapper scripts that include your server procs
|
64
|
+
|
65
|
+
Layout: suppose you have some code you want to run in the background and control that background process
|
66
|
+
from a script:
|
67
|
+
|
68
|
+
# this is your code
|
69
|
+
# it does nothing really useful at the moment
|
70
|
+
|
71
|
+
loop do
|
72
|
+
sleep(5)
|
73
|
+
end
|
74
|
+
|
75
|
+
To run this code as a daemon create <tt>myproc_control.rb</tt> like this and include your code:
|
76
|
+
|
77
|
+
# this is myproc_control.rb
|
78
|
+
|
79
|
+
require 'rubygems' # if you use RubyGems
|
80
|
+
require 'daemons'
|
81
|
+
|
82
|
+
Daemons.run_proc('myproc.rb') do
|
83
|
+
loop do
|
84
|
+
sleep(5)
|
85
|
+
end
|
86
|
+
end
|
87
|
+
|
88
|
+
And use it like this from the console:
|
89
|
+
|
90
|
+
$ ruby myproc_control.rb start
|
91
|
+
(myproc.rb is now running in the background)
|
92
|
+
$ ruby myproc_control.rb restart
|
93
|
+
(...)
|
94
|
+
$ ruby myproc_control.rb stop
|
95
|
+
|
96
|
+
For testing purposes you can even run <tt>myproc.rb</tt> <i>without forking</i> in the background:
|
97
|
+
|
98
|
+
$ ruby myproc_control.rb run
|
99
|
+
|
100
|
+
=== 3. Control a bunch of daemons from another application
|
101
|
+
|
102
|
+
Layout: you have an application <tt>my_app.rb</tt> that wants to run a bunch of
|
103
|
+
server tasks as daemon processes.
|
104
|
+
|
105
|
+
# this is my_app.rb
|
106
|
+
|
107
|
+
require 'rubygems' # if you use RubyGems
|
108
|
+
require 'daemons'
|
109
|
+
|
110
|
+
task1 = Daemons.call(:multiple => true) do
|
111
|
+
# first server task
|
112
|
+
|
113
|
+
loop {
|
114
|
+
conn = accept_conn()
|
115
|
+
serve(conn)
|
116
|
+
}
|
117
|
+
end
|
118
|
+
|
119
|
+
task2 = Daemons.call do
|
120
|
+
# second server task
|
121
|
+
|
122
|
+
loop {
|
123
|
+
something_different()
|
124
|
+
}
|
125
|
+
end
|
126
|
+
|
127
|
+
# the parent process continues to run
|
128
|
+
|
129
|
+
# we can even control our tasks, for example stop them
|
130
|
+
task1.stop
|
131
|
+
task2.stop
|
132
|
+
|
133
|
+
exit
|
134
|
+
|
135
|
+
=== 4. Daemonize the currently running process
|
136
|
+
|
137
|
+
Layout: you have an application <tt>my_daemon.rb</tt> that wants to run as a daemon
|
138
|
+
(but without the ability to be controlled by daemons via start/stop commands)
|
139
|
+
|
140
|
+
# this is my_daemons.rb
|
141
|
+
|
142
|
+
require 'rubygems' # if you use RubyGems
|
143
|
+
require 'daemons'
|
144
|
+
|
145
|
+
# Initialize the app while we're not a daemon
|
146
|
+
init()
|
147
|
+
|
148
|
+
# Become a daemon
|
149
|
+
Daemons.daemonize
|
150
|
+
|
151
|
+
# The server loop
|
152
|
+
loop {
|
153
|
+
conn = accept_conn()
|
154
|
+
serve(conn)
|
155
|
+
}
|
156
|
+
|
157
|
+
|
158
|
+
<b>For further documentation, refer to the module documentation of Daemons.</b>
|
159
|
+
|
160
|
+
|
161
|
+
== Download and Installation
|
162
|
+
|
163
|
+
*Download*: just go to http://rubyforge.org/projects/daemons/
|
164
|
+
|
165
|
+
Installation *with* RubyGems:
|
166
|
+
$ su
|
167
|
+
# gem install daemons
|
168
|
+
|
169
|
+
Installation *without* RubyGems:
|
170
|
+
$ tar xfz daemons-x.x.x.tar.gz
|
171
|
+
$ cd daemons-x.x.x
|
172
|
+
$ su
|
173
|
+
# ruby setup.rb
|
174
|
+
|
175
|
+
== Documentation
|
176
|
+
|
177
|
+
For further documentation, refer to the module documentation of Daemons (click on Daemons).
|
178
|
+
|
179
|
+
The RDoc documentation is also online at http://daemons.rubyforge.org
|
180
|
+
|
181
|
+
|
182
|
+
== Author
|
183
|
+
|
184
|
+
Written 2005-2013 by Thomas Uehlinger <mailto:th.uehlinger@gmx.ch>.
|
185
|
+
Anonymous SVN checkout is available with "svn checkout http://daemons.rubyforge.org/svn/".
|
186
|
+
|
187
|
+
== License
|
188
|
+
|
189
|
+
Copyright (c) 2005-2013 Thomas Uehlinger
|
190
|
+
|
191
|
+
Permission is hereby granted, free of charge, to any person
|
192
|
+
obtaining a copy of this software and associated documentation
|
193
|
+
files (the "Software"), to deal in the Software without
|
194
|
+
restriction, including without limitation the rights to use,
|
195
|
+
copy, modify, merge, publish, distribute, sublicense, and/or sell
|
196
|
+
copies of the Software, and to permit persons to whom the
|
197
|
+
Software is furnished to do so, subject to the following
|
198
|
+
conditions:
|
199
|
+
|
200
|
+
The above copyright notice and this permission notice shall be
|
201
|
+
included in all copies or substantial portions of the Software.
|
202
|
+
|
203
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
204
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
205
|
+
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
206
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
207
|
+
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
208
|
+
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
209
|
+
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
210
|
+
OTHER DEALINGS IN THE SOFTWARE.
|
211
|
+
|
212
|
+
== Feedback and other resources
|
213
|
+
|
214
|
+
At http://rubyforge.org/projects/daemons .
|
data/Rakefile
ADDED
@@ -0,0 +1,32 @@
|
|
1
|
+
require "bundler/gem_tasks"
|
2
|
+
require "rdoc/task"
|
3
|
+
|
4
|
+
task :upload do
|
5
|
+
sh "scp -r html/* uehli@rubyforge.org:/var/www/gforge-projects/daemons"
|
6
|
+
end
|
7
|
+
|
8
|
+
desc "Create the RDOC html files"
|
9
|
+
rd = Rake::RDocTask.new("rdoc") do |rdoc|
|
10
|
+
rdoc.rdoc_dir = 'html'
|
11
|
+
rdoc.title = "Daemons"
|
12
|
+
rdoc.options << '--line-numbers' << '--inline-source' << '--main' << 'README'
|
13
|
+
rdoc.rdoc_files.include('README', 'TODO', 'Releases')
|
14
|
+
rdoc.rdoc_files.include('lib/**/*.rb')
|
15
|
+
end
|
16
|
+
|
17
|
+
desc "Version bump"
|
18
|
+
task :version_bump do
|
19
|
+
# VERSION = "1.1.10.2"
|
20
|
+
lines = File.open("lib/daemons/version.rb") { |io| io.readlines }
|
21
|
+
lines = lines.map do |line|
|
22
|
+
if line =~ /VERSION = "(\d+(\.\d+)+)"/
|
23
|
+
version = $1.split(/\./).map(&:to_i)
|
24
|
+
version[-1] += 1
|
25
|
+
line.gsub(/".*"/) { '"' + version.join(".") + '"' }
|
26
|
+
else
|
27
|
+
line
|
28
|
+
end
|
29
|
+
end
|
30
|
+
File.open("lib/daemons/version.rb","w") { |io| io.puts lines }
|
31
|
+
`git commit -m "Version bump" lib/daemons/version.rb`
|
32
|
+
end
|
data/Releases
ADDED
@@ -0,0 +1,201 @@
|
|
1
|
+
= Daemons Release History
|
2
|
+
|
3
|
+
== Release 1.1.10: June 26, 2013
|
4
|
+
|
5
|
+
* fix Pid.running? rescuing timeout exceptions (thanks to Geraud Boyer)
|
6
|
+
* monitor.rb/application.rb/application_group.rb: handle :monitor and :multiple in combination correctly
|
7
|
+
(thanks to Prakash Murthy).
|
8
|
+
|
9
|
+
== Release 1.1.9: August 10, 2012
|
10
|
+
|
11
|
+
* daemonize.rb: do srand in the forked child process both in daemonize and call_as_daemon
|
12
|
+
(thanks to Andrew Havens).
|
13
|
+
|
14
|
+
== Release 1.1.8: February 7, 2012
|
15
|
+
|
16
|
+
* rename to daemonization.rb to daemonize.rb (and Daemonization to Daemonize) to
|
17
|
+
ensure compatibility.
|
18
|
+
|
19
|
+
== Release 1.1.7: February 6, 2012
|
20
|
+
|
21
|
+
* start_proc: Write out the PID file in the newly created proc to avoid race conditions.
|
22
|
+
* daemonize.rb: remove to simplify licensing (replaced by daemonization.rb).
|
23
|
+
|
24
|
+
== Release 1.1.6: January 18, 2012
|
25
|
+
|
26
|
+
* Add the :app_name option for the "call" daemonization mode.
|
27
|
+
|
28
|
+
== Release 1.1.5: December 19, 2011
|
29
|
+
|
30
|
+
* Catch the case where the pidfile is empty but not deleted
|
31
|
+
and restart the app (thanks to Rich Healey)
|
32
|
+
|
33
|
+
== Release 1.1.4: June 17, 2011
|
34
|
+
|
35
|
+
* Do not change the umask to 0000 when daemonizing anymore, just leave it as it
|
36
|
+
was (thanks to Jon Botelho).
|
37
|
+
|
38
|
+
== Release 1.1.3: April 14, 2011
|
39
|
+
|
40
|
+
* Fixed a bug in Application.stop: the cached pid number needs to
|
41
|
+
be used to check for the status of a killed process (thanks to Jimmy Sieben).
|
42
|
+
|
43
|
+
== Release 1.1.2: March 29, 2011
|
44
|
+
|
45
|
+
* Fixed gemspec to include all needed files.
|
46
|
+
|
47
|
+
== Release 1.1.1: March 29, 2011
|
48
|
+
|
49
|
+
* Make the logging facilities work in :mode => :none (i.e. when calling
|
50
|
+
Daemons.daemonize) (thanks to the input from Peter Hegedus).
|
51
|
+
|
52
|
+
== Release 1.1.0: June 20, 2010
|
53
|
+
|
54
|
+
* Honour the options[:app_name] in Daemons.daemonize (thanks to Ryan Tecco).
|
55
|
+
* Included a new option :stop_proc to specify a proc that will be called when a
|
56
|
+
daemonized process receives a request to stop (thanks to Dave Dupre).
|
57
|
+
* Only delete the pidfile if the current pid is the original pid (ghazel).
|
58
|
+
* Start when restart but no application running (pcreux).
|
59
|
+
* Silently continue if there is no pidfile (ghazel).
|
60
|
+
* We now per default wait for processes to stop and
|
61
|
+
kill them automatically it if they do not stop within a given time
|
62
|
+
(force_kill_waittime). Use the option --no_wait to not wait for processes to
|
63
|
+
stop.
|
64
|
+
* Set log files mode to 0644 (mikehale).
|
65
|
+
* Set pid file permissions to 0644 (mikehale).
|
66
|
+
* Added ability to change process uid/gid (mikehale).
|
67
|
+
* Fix for: If you happen to start a daemon from a process that has open file
|
68
|
+
descriptors these will stay open. As it is daemonize.rb only closes ruby IO
|
69
|
+
objects (thanks to Han Holl).
|
70
|
+
* New reload command (SIGHUP) (thanks to Michael Schuerig).
|
71
|
+
|
72
|
+
== Release 1.0.10: March 21, 2008
|
73
|
+
|
74
|
+
* By default, we now delete stray pid-files (i.e. pid-files which result for
|
75
|
+
example from a killed daemon) automatically. This function can be deactivated
|
76
|
+
by passing :keep_pid_files => true as an option.
|
77
|
+
* All pid files of :multiple daemons new get deleted correctly upon exit of the
|
78
|
+
daemons (reported by Han Holl).
|
79
|
+
* Use the signal 'KILL' instead of 'TERM' on Windows platforms.
|
80
|
+
* Use exit! in trap('TERM') instead of exit when option :hard_exit is given
|
81
|
+
(thanks to Han Holl).
|
82
|
+
* Did some clarification on the exception log.
|
83
|
+
|
84
|
+
== Release 1.0.9: October 29, 2007
|
85
|
+
|
86
|
+
* fixed a severe bug in the new Pid.running? function: function returned true if
|
87
|
+
the process did not exist (thanks to Jeremy Lawler).
|
88
|
+
|
89
|
+
== Release 1.0.8: September 24, 2007
|
90
|
+
|
91
|
+
* new Pid.running? function. Checking whether a process exists by sending
|
92
|
+
signal '0' (thanks to Dru Nelson).
|
93
|
+
|
94
|
+
== Release 1.0.7: July 7, 2007
|
95
|
+
|
96
|
+
* Patch to fix wrong ARGV when using :exec (in def start_exec:
|
97
|
+
Kernel.exec(script(), *(@app_argv || []))) (thanks to Alex McGuire).
|
98
|
+
|
99
|
+
== Release 1.0.6: Mai 8, 2007
|
100
|
+
|
101
|
+
* New option to pass an ARGV-style array to run and run_proc (thanks to Marc Evans).
|
102
|
+
* Additional patches for '/var/log' (thanks to Marc Evans).
|
103
|
+
|
104
|
+
== Release 1.0.5: February 24, 2007
|
105
|
+
|
106
|
+
* Applied patch that makes daemons to use '/var/log' as logfile
|
107
|
+
directory if you use :dir_mode = :system (thanks to Han Holl).
|
108
|
+
* Daemons should now work with Ruby 1.9 (at least the basic features).
|
109
|
+
|
110
|
+
== Release 1.0.4: January 17, 2007
|
111
|
+
|
112
|
+
* Document the :log_output option (thanks to Andrew Kuklewicz).
|
113
|
+
* Set STDOUT.sync = true when redirecting to a logfile (thanks to Andrew Kuklewicz).
|
114
|
+
* Should now run also correctly when there is no working 'ps ax' on the system
|
115
|
+
(thanks to Daniel Kehoe).
|
116
|
+
|
117
|
+
== Release 1.0.3: November 1, 2006
|
118
|
+
|
119
|
+
* Set the app_name correctly also for the monitor process (thanks to Ilya Novoselov).
|
120
|
+
|
121
|
+
== Release 1.0.2: September 26, 2006
|
122
|
+
|
123
|
+
* Changed the 'ps -ax' call back to 'ps ax'.
|
124
|
+
* Fixed the documentation for the :normal :dir_mode.
|
125
|
+
* As a default for Daemons.run_proc, the pid file is now saved in the current directory.
|
126
|
+
* In :ontop mode for running a proc (this is equal to calling something like 'ruby ctrl_proc.rb run'),
|
127
|
+
the proc now runs directly in the calling script, not in a forked process anymore (thanks to Paul Butcher).
|
128
|
+
* Set $0 to app_name in the daemons (thanks to Ilya Novoselov).
|
129
|
+
|
130
|
+
== Release 1.0.1: August 30, 2006
|
131
|
+
|
132
|
+
* Fixed a regex for parsing the 'ps ax' system call. (thanks to Garance Alistair Drosehn)
|
133
|
+
|
134
|
+
== Release 1.0.0: August 29, 2006
|
135
|
+
|
136
|
+
* Fix the parsing of the 'ps ax' system call. (thanks to Garance Alistair Drosehn)
|
137
|
+
|
138
|
+
== Release 0.4.4: February 14, 2006
|
139
|
+
|
140
|
+
* Several fixes that allow us to use the Daemons::Controller
|
141
|
+
with a proc instead of wrapping a script file. This gives us all the
|
142
|
+
PID file management, monitoring, command line options, etc. without having
|
143
|
+
to specify a path to our script which can be tricky, especially when using
|
144
|
+
RubyGems. (thanks to John-Mason Shackelford)
|
145
|
+
|
146
|
+
== Release 0.4.3: November 29, 2005
|
147
|
+
|
148
|
+
* New Option: You can specify the name of the application with :app_name
|
149
|
+
on calling Daemons.run. This will be used to contruct the name of the pid files
|
150
|
+
and log files. Defaults to the basename of the script. (thanks to Stephen R. Veit)
|
151
|
+
|
152
|
+
* Bugfix: Handle the case where no controller options are given when calling Daemons,
|
153
|
+
just options after "--". (thanks to Stephen R. Veit)
|
154
|
+
|
155
|
+
|
156
|
+
== Release 0.4.2: November 15, 2005
|
157
|
+
|
158
|
+
* Bugfix for problem with :normal pid-file directory mode (pid.rb), fixed (thanks to Stephen R. Veit)
|
159
|
+
|
160
|
+
|
161
|
+
== Release 0.4.1: September 11, 2005
|
162
|
+
|
163
|
+
* Bugfix for 'run' command line mode: didn't work anymore in 0.4.0, fixed
|
164
|
+
|
165
|
+
|
166
|
+
== Release 0.4.0: July 30, 2005
|
167
|
+
|
168
|
+
* Two completely new operation modes:
|
169
|
+
1. Call a block as a daemon (<tt>Daemons.call { my_daemon_code }</tt>)
|
170
|
+
and control it from the parent process.
|
171
|
+
2. Daemonize the currently running process (<tt>Daemons.daemonize</tt>)
|
172
|
+
plus the already existing mode to control your scripts (<tt>Daemons.run("script.rb")</tt>)
|
173
|
+
* Improved documentation (for example "How does the daemonization process work?")
|
174
|
+
* Improved "simulation mode" (<tt>:ontop</tt> option)
|
175
|
+
* Some minor bugfixes
|
176
|
+
|
177
|
+
|
178
|
+
== Release 0.3.0: April 21, 2005
|
179
|
+
|
180
|
+
* New monitor functionality: automatic restarting of your applications if they crash
|
181
|
+
* 'restart' command fixed
|
182
|
+
* '--force' command modifier (please refer to the documentation)
|
183
|
+
* Some more bugfixes and improvements
|
184
|
+
|
185
|
+
|
186
|
+
== Release 0.2.1: Mar 21, 2005
|
187
|
+
|
188
|
+
* Bugfix for a problem with the 'status' command
|
189
|
+
|
190
|
+
|
191
|
+
== Release 0.2.0: Mar 21, 2005
|
192
|
+
|
193
|
+
* Exception backtrace functionality added
|
194
|
+
* Exec functionality added
|
195
|
+
* More examples added
|
196
|
+
* New commands: status, zap
|
197
|
+
|
198
|
+
|
199
|
+
== Release 0.0.1: Feb 8, 2005
|
200
|
+
|
201
|
+
* Initial release
|