passenger 4.0.0.rc6 → 4.0.1

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of passenger might be problematic. Click here for more details.

Files changed (49) hide show
  1. data.tar.gz.asc +7 -7
  2. data/NEWS +14 -0
  3. data/build/basics.rb +2 -1
  4. data/build/packaging.rb +33 -0
  5. data/dev/run_travis.sh +1 -0
  6. data/doc/Architectural overview.html +1 -3
  7. data/doc/Packaging.txt.md +6 -6
  8. data/doc/Security of user switching support.html +1 -3
  9. data/doc/Users guide Apache.html +53 -20
  10. data/doc/Users guide Apache.idmap.txt +4 -0
  11. data/doc/Users guide Apache.txt +8 -0
  12. data/doc/Users guide Nginx.html +41 -18
  13. data/doc/Users guide Standalone.html +1 -3
  14. data/doc/users_guide_snippets/analysis_and_system_maintenance.txt +11 -5
  15. data/doc/users_guide_snippets/installation.txt +5 -1
  16. data/doc/users_guide_snippets/tips.txt +10 -7
  17. data/doc/users_guide_snippets/under_the_hood/page_caching_support.txt +2 -2
  18. data/ext/apache2/Configuration.cpp +5 -6
  19. data/ext/apache2/Configuration.hpp +0 -4
  20. data/ext/common/ApplicationPool2/Group.h +25 -43
  21. data/ext/common/ApplicationPool2/Implementation.cpp +51 -32
  22. data/ext/common/ApplicationPool2/Pool.h +6 -7
  23. data/ext/common/ApplicationPool2/Process.h +61 -44
  24. data/ext/common/ApplicationPool2/Spawner.h +5 -0
  25. data/ext/common/BackgroundEventLoop.cpp +5 -11
  26. data/ext/common/Constants.h +1 -1
  27. data/ext/common/Utils.cpp +1 -1
  28. data/ext/common/agents/HelperAgent/AgentOptions.h +1 -1
  29. data/ext/common/agents/HelperAgent/RequestHandler.h +2 -0
  30. data/ext/common/agents/LoggingAgent/LoggingServer.h +4 -1
  31. data/ext/common/agents/LoggingAgent/RemoteSender.h +58 -6
  32. data/lib/phusion_passenger.rb +2 -2
  33. data/lib/phusion_passenger/loader_shared_helpers.rb +6 -6
  34. data/lib/phusion_passenger/platform_info/compiler.rb +16 -0
  35. data/lib/phusion_passenger/platform_info/depcheck_specs/apache2.rb +1 -1
  36. data/lib/phusion_passenger/request_handler.rb +1 -0
  37. data/lib/phusion_passenger/standalone/start_command.rb +0 -4
  38. data/lib/phusion_passenger/utils/robust_interruption.rb +47 -28
  39. data/resources/templates/standalone/config.erb +4 -22
  40. data/test/config.json.example +1 -1
  41. data/test/cxx/ApplicationPool2/DirectSpawnerTest.cpp +5 -3
  42. data/test/cxx/ApplicationPool2/PoolTest.cpp +75 -2
  43. data/test/cxx/ApplicationPool2/SmartSpawnerTest.cpp +12 -7
  44. data/test/cxx/ApplicationPool2/SpawnerTestCases.cpp +18 -5
  45. data/test/cxx/RequestHandlerTest.cpp +3 -0
  46. data/test/ruby/shared/loader_sharedspec.rb +4 -0
  47. metadata +5 -6
  48. metadata.gz.asc +7 -7
  49. data/doc/Users guide Apache.index.sqlite3 +0 -0
@@ -22,6 +22,7 @@
22
22
 
23
23
  #define RUN_USER_SWITCHING_TEST() \
24
24
  process = spawner->spawn(options); \
25
+ process->requiresShutdown = false; \
25
26
  BufferedIO io(FileDescriptor(open("/tmp/info.txt", O_RDONLY))); \
26
27
  uid_t uid = (uid_t) atol(io.readLine().c_str()); \
27
28
  gid_t gid = (gid_t) atol(io.readLine().c_str()); \
@@ -81,6 +82,7 @@
81
82
  options.startupFile = "start.rb";
82
83
  SpawnerPtr spawner = createSpawner(options);
83
84
  process = spawner->spawn(options);
85
+ process->requiresShutdown = false;
84
86
  ensure_equals(process->sockets->size(), 1u);
85
87
 
86
88
  Connection conn = process->sockets->front().checkoutConnection();
@@ -98,7 +100,8 @@
98
100
  options.startTimeout = 300;
99
101
  SpawnerPtr spawner = createSpawner(options);
100
102
  try {
101
- spawner->spawn(options);
103
+ process = spawner->spawn(options);
104
+ process->requiresShutdown = false;
102
105
  fail("Timeout expected");
103
106
  } catch (const SpawnException &e) {
104
107
  ensure_equals(e.getErrorKind(),
@@ -115,7 +118,8 @@
115
118
  options.startupFile = ".";
116
119
  SpawnerPtr spawner = createSpawner(options);
117
120
  try {
118
- spawner->spawn(options);
121
+ process = spawner->spawn(options);
122
+ process->requiresShutdown = false;
119
123
  fail("Exception expected");
120
124
  } catch (const SpawnException &e) {
121
125
  ensure_equals(e.getErrorKind(),
@@ -132,7 +136,8 @@
132
136
  options.startupFile = "start_error.pl";
133
137
  SpawnerPtr spawner = createSpawner(options);
134
138
  try {
135
- spawner->spawn(options);
139
+ process = spawner->spawn(options);
140
+ process->requiresShutdown = false;
136
141
  fail("SpawnException expected");
137
142
  } catch (const SpawnException &e) {
138
143
  ensure_equals(e.getErrorKind(),
@@ -153,7 +158,8 @@
153
158
  options.startTimeout = 300;
154
159
  SpawnerPtr spawner = createSpawner(options);
155
160
  try {
156
- spawner->spawn(options);
161
+ process = spawner->spawn(options);
162
+ process->requiresShutdown = false;
157
163
  fail("Timeout expected");
158
164
  } catch (const SpawnException &e) {
159
165
  ensure_equals(e.getErrorKind(),
@@ -169,6 +175,7 @@
169
175
  options.startupFile = "start.rb";
170
176
  SpawnerPtr spawner = createSpawner(options);
171
177
  process = spawner->spawn(options);
178
+ process->requiresShutdown = false;
172
179
  ensure_equals(process->sockets->size(), 1u);
173
180
 
174
181
  Connection conn = process->sockets->front().checkoutConnection();
@@ -187,6 +194,7 @@
187
194
  options.environmentVariables.push_back(make_pair("PASSENGER_BAR", "bar"));
188
195
  SpawnerPtr spawner = createSpawner(options);
189
196
  process = spawner->spawn(options);
197
+ process->requiresShutdown = false;
190
198
  ensure_equals(process->sockets->size(), 1u);
191
199
 
192
200
  Connection conn = process->sockets->front().checkoutConnection();
@@ -206,7 +214,8 @@
206
214
  options.environmentVariables.push_back(make_pair("PASSENGER_FOO", "foo"));
207
215
  SpawnerPtr spawner = createSpawner(options);
208
216
  try {
209
- spawner->spawn(options);
217
+ process = spawner->spawn(options);
218
+ process->requiresShutdown = false;
210
219
  fail("Exception expected");
211
220
  } catch (const SpawnException &e) {
212
221
  ensure(containsSubstring(e["envvars"], "PASSENGER_FOO=foo\n"));
@@ -236,6 +245,7 @@
236
245
 
237
246
  try {
238
247
  process = spawner->spawn(options);
248
+ process->requiresShutdown = false;
239
249
  fail("SpawnException expected");
240
250
  } catch (const SpawnException &e) {
241
251
  ensure("(1)", containsSubstring(e.getErrorPage(),
@@ -245,6 +255,7 @@
245
255
  runShellCommand("chmod 700 tmp.check/a");
246
256
  try {
247
257
  process = spawner->spawn(options);
258
+ process->requiresShutdown = false;
248
259
  fail("SpawnException expected");
249
260
  } catch (const SpawnException &e) {
250
261
  ensure("(2)", containsSubstring(e.getErrorPage(),
@@ -254,6 +265,7 @@
254
265
  runShellCommand("chmod 700 tmp.check/a/b/c");
255
266
  try {
256
267
  process = spawner->spawn(options);
268
+ process->requiresShutdown = false;
257
269
  fail("SpawnException expected");
258
270
  } catch (const SpawnException &e) {
259
271
  ensure("(3)", containsSubstring(e.getErrorPage(),
@@ -262,6 +274,7 @@
262
274
 
263
275
  runShellCommand("chmod 700 tmp.check/a/b/c/d");
264
276
  process = spawner->spawn(options); // Should not throw.
277
+ process->requiresShutdown = false;
265
278
  }
266
279
  }
267
280
 
@@ -3,6 +3,7 @@
3
3
  #include <agents/HelperAgent/RequestHandler.cpp>
4
4
  #include <agents/HelperAgent/AgentOptions.h>
5
5
  #include <ApplicationPool2/Pool.h>
6
+ #include <Utils/json.h>
6
7
  #include <Utils/IOUtils.h>
7
8
  #include <Utils/Timer.h>
8
9
 
@@ -48,6 +49,8 @@ namespace tut {
48
49
  setLogLevel(LVL_ERROR); // TODO: set to LVL_WARN
49
50
 
50
51
  agentOptions.passengerRoot = resourceLocator->getRoot();
52
+ agentOptions.defaultUser = testConfig["default_user"].asString();
53
+ agentOptions.defaultGroup = testConfig["default_group"].asString();
51
54
  root = resourceLocator->getRoot();
52
55
  rackAppPath = root + "/test/stub/rack";
53
56
  wsgiAppPath = root + "/test/stub/wsgi";
@@ -37,6 +37,10 @@ class Loader
37
37
  end
38
38
 
39
39
  def close
40
+ @input.close_write
41
+ # Wait at most 100 msec for process to exit.
42
+ select([@output], nil, nil, 0.1)
43
+
40
44
  @input.close if !@input.closed?
41
45
  @output.close if !@output.closed?
42
46
  if @pid
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: passenger
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.0.rc6
5
- prerelease: 6
4
+ version: 4.0.1
5
+ prerelease:
6
6
  platform: ruby
7
7
  authors:
8
8
  - Phusion - http://www.phusion.nl/
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-04-09 00:00:00.000000000 Z
12
+ date: 2013-05-06 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake
@@ -226,7 +226,6 @@ files:
226
226
  - doc/templates/markdown.html.erb
227
227
  - doc/Users guide Apache.html
228
228
  - doc/Users guide Apache.idmap.txt
229
- - doc/Users guide Apache.index.sqlite3
230
229
  - doc/Users guide Apache.txt
231
230
  - doc/Users guide Nginx.html
232
231
  - doc/Users guide Nginx.idmap.txt
@@ -2725,9 +2724,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
2725
2724
  required_rubygems_version: !ruby/object:Gem::Requirement
2726
2725
  none: false
2727
2726
  requirements:
2728
- - - ! '>'
2727
+ - - ! '>='
2729
2728
  - !ruby/object:Gem::Version
2730
- version: 1.3.1
2729
+ version: '0'
2731
2730
  requirements: []
2732
2731
  rubyforge_project: passenger
2733
2732
  rubygems_version: 1.8.25
metadata.gz.asc CHANGED
@@ -2,11 +2,11 @@
2
2
  Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
3
3
  Comment: GPGTools - http://gpgtools.org
4
4
 
5
- iQEcBAABAgAGBQJRZAnsAAoJECrHRaUKISqMnUkIALsTpow4UO6t7iY6uyUeVQg6
6
- We42umF91RGnAIPF/jhXwEhK5bmwxGgzYte8BBk79oh5U5+Y5WM4WwSnnKLRbiBO
7
- 34SbieXr8gCSoPZIP8Jz34Zn6h7Rit+ETcasFkrq+PojmyeNeE+0ygU/nY+3GoQR
8
- 5tx8M6wvpPhbjpbiWOqmf+kf5SJT3Kx6bLrJveHd+HEzQS6Gek8d8uif+d/hi3AT
9
- oUt/1L9AA/qX7H3ucuVNUA2ohMjuX1+vtFqezK6h6GcVwDvy91aepLGuCWn/TA2f
10
- wbExtgfZ8DHrW6y/whEbiii21ZlVohpIpbxshnu4/LtEYG42kkNM3ExgeoPV9/s=
11
- =EKr1
5
+ iQEcBAABAgAGBQJRh4ZKAAoJECrHRaUKISqMAQAH/jFHy9rLAO/8bYVs8+M329/M
6
+ vu8LA/dGFzpYoR1uyUP2R0uDwGIif+vuawrCDsowtFXmPYPj7I+1vjP0Z3egiytn
7
+ KTBjwPG1yRXvmBdoS7T/L6CoIfbxawrbbVaDpUEx/wsq8V4wOMrpvvNuSWsCBVnF
8
+ V1JnCm6/O5+ZVrXbheEUKEw4/KhXQ4v80lvjMGzOD+LiFeDvPOpONDgZIhfRBWsl
9
+ OMLhHjtLi0QfQVLb7KbY18atgEY8vPd0xbAfK5rR8hWhsHsv97zWgU+G/xJgJqIZ
10
+ pjWnkZL/8H6H4ZkbEb4JDLQhyFQeI2Atym+4MR+Sb/ru90BxSlNWXyCQC2LcSNo=
11
+ =+ZYC
12
12
  -----END PGP SIGNATURE-----