ajp-rails 0.0.3 → 0.0.4

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.
data/NEWS.en CHANGED
@@ -1,4 +1,7 @@
1
1
  = NEWS
2
+ == 0.0.4 (2006-01-27)
3
+ * The `0.4th' release
4
+ * Daemonizing support.
2
5
  == 0.0.3 (2006-01-25)
3
6
  * The `0.3th' release.
4
7
  * Sticky session support.
data/NEWS.ja CHANGED
@@ -1,4 +1,7 @@
1
1
  = NEWS
2
+ == 0.0.4 (2006.01-27)
3
+ * ����äȽ���`��0.4��'��꡼��
4
+ * �ǡ�����������ݡ���
2
5
  == 0.0.3 (2006-01-25)
3
6
  * ����äȽ���`��0.3��'��꡼��
4
7
  * Sticky session�򥵥ݡ���
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |spec|
2
2
  spec.name = "ajp-rails"
3
- spec.version = "0.0.3"
3
+ spec.version = "0.0.4"
4
4
  spec.required_ruby_version = ">= 1.8.3"
5
5
  spec.add_dependency('ruby-ajp', '>= 0.2.0')
6
6
  spec.add_dependency('rails', '>= 0.14')
@@ -156,8 +156,15 @@ if is_daemon = options[OPTION_NAMES_TO_INTERNAL_NAMES['daemon']]
156
156
  options.delete(OPTION_NAMES_TO_INTERNAL_NAMES['daemon'])
157
157
 
158
158
  exit if Process.fork
159
- Process.setsid
159
+ raise 'Cannot detach from the terminal' unless Process.setsid
160
160
  exit if Process.fork
161
+ ObjectSpace.each_object(IO) do |io|
162
+ begin
163
+ io.close unless [STDIN, STDOUT, STDERR].include?(io)
164
+ rescue IOError
165
+ # do nothing
166
+ end
167
+ end
161
168
  File.umask(0)
162
169
  end
163
170
 
@@ -168,10 +175,10 @@ Dir.chdir options[OPTION_NAMES_TO_INTERNAL_NAMES['directory']]
168
175
  require 'config/environment'
169
176
 
170
177
  if is_daemon
171
- Dir.chdir('/')
178
+ #Dir.chdir('/')
172
179
  STDIN.reopen('/dev/null')
173
180
  STDOUT.reopen('/dev/null', 'w')
174
- STDERR.reopen('/dev/null', 'w')
181
+ STDERR.reopen(STDOUT)
175
182
  end
176
183
 
177
184
  runner = RailsRunner.new(options)
metadata CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.8.11
3
3
  specification_version: 1
4
4
  name: ajp-rails
5
5
  version: !ruby/object:Gem::Version
6
- version: 0.0.3
7
- date: 2006-01-25 00:00:00 +09:00
6
+ version: 0.0.4
7
+ date: 2006-01-27 00:00:00 +09:00
8
8
  summary: Ruby on Rails Runner, which uses AJP(Apache JServ Protocol) to cooperate with a HTTPd, instead of CGI or FastCGI
9
9
  require_paths:
10
10
  - lib