passenger 1.0.4 → 1.0.5

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 (98) hide show
  1. data/Rakefile +7 -4
  2. data/bin/passenger-install-apache2-module +3 -1
  3. data/doc/Users guide.html +1 -1
  4. data/doc/cxxapi/ApplicationPoolClientServer_8h-source.html +1 -1
  5. data/doc/cxxapi/ApplicationPoolServer_8h-source.html +497 -496
  6. data/doc/cxxapi/ApplicationPool_8h-source.html +1 -1
  7. data/doc/cxxapi/Application_8h-source.html +1 -1
  8. data/doc/cxxapi/Configuration_8h-source.html +2 -2
  9. data/doc/cxxapi/DummySpawnManager_8h-source.html +1 -1
  10. data/doc/cxxapi/Exceptions_8h-source.html +1 -1
  11. data/doc/cxxapi/Hooks_8h-source.html +1 -1
  12. data/doc/cxxapi/Logging_8h-source.html +1 -1
  13. data/doc/cxxapi/MessageChannel_8h-source.html +224 -198
  14. data/doc/cxxapi/SpawnManager_8h-source.html +1 -1
  15. data/doc/cxxapi/StandardApplicationPool_8h-source.html +1 -1
  16. data/doc/cxxapi/Utils_8h-source.html +1 -1
  17. data/doc/cxxapi/annotated.html +1 -1
  18. data/doc/cxxapi/classClient-members.html +1 -1
  19. data/doc/cxxapi/classClient.html +1 -1
  20. data/doc/cxxapi/classPassenger_1_1Application-members.html +1 -1
  21. data/doc/cxxapi/classPassenger_1_1Application.html +1 -1
  22. data/doc/cxxapi/classPassenger_1_1ApplicationPool-members.html +1 -1
  23. data/doc/cxxapi/classPassenger_1_1ApplicationPool.html +1 -1
  24. data/doc/cxxapi/classPassenger_1_1ApplicationPoolServer-members.html +1 -1
  25. data/doc/cxxapi/classPassenger_1_1ApplicationPoolServer.html +1 -1
  26. data/doc/cxxapi/classPassenger_1_1Application_1_1Session-members.html +1 -1
  27. data/doc/cxxapi/classPassenger_1_1Application_1_1Session.html +1 -1
  28. data/doc/cxxapi/classPassenger_1_1ConfigurationException-members.html +1 -1
  29. data/doc/cxxapi/classPassenger_1_1ConfigurationException.html +1 -1
  30. data/doc/cxxapi/classPassenger_1_1DummySpawnManager-members.html +1 -1
  31. data/doc/cxxapi/classPassenger_1_1DummySpawnManager.html +1 -1
  32. data/doc/cxxapi/classPassenger_1_1FileNotFoundException-members.html +1 -1
  33. data/doc/cxxapi/classPassenger_1_1FileNotFoundException.html +1 -1
  34. data/doc/cxxapi/classPassenger_1_1IOException-members.html +1 -1
  35. data/doc/cxxapi/classPassenger_1_1IOException.html +1 -1
  36. data/doc/cxxapi/classPassenger_1_1MessageChannel-members.html +1 -1
  37. data/doc/cxxapi/classPassenger_1_1MessageChannel.html +1 -1
  38. data/doc/cxxapi/classPassenger_1_1SpawnException-members.html +1 -1
  39. data/doc/cxxapi/classPassenger_1_1SpawnException.html +1 -1
  40. data/doc/cxxapi/classPassenger_1_1SpawnManager-members.html +1 -1
  41. data/doc/cxxapi/classPassenger_1_1SpawnManager.html +1 -1
  42. data/doc/cxxapi/classPassenger_1_1StandardApplicationPool-members.html +1 -1
  43. data/doc/cxxapi/classPassenger_1_1StandardApplicationPool.html +1 -1
  44. data/doc/cxxapi/classPassenger_1_1SystemException-members.html +1 -1
  45. data/doc/cxxapi/classPassenger_1_1SystemException.html +1 -1
  46. data/doc/cxxapi/definitions_8h-source.html +1 -1
  47. data/doc/cxxapi/files.html +1 -1
  48. data/doc/cxxapi/functions.html +1 -1
  49. data/doc/cxxapi/functions_func.html +1 -1
  50. data/doc/cxxapi/functions_type.html +1 -1
  51. data/doc/cxxapi/graph_legend.html +1 -1
  52. data/doc/cxxapi/graph_legend.png +0 -0
  53. data/doc/cxxapi/group__Configuration.html +3 -3
  54. data/doc/cxxapi/group__Configuration.png +0 -0
  55. data/doc/cxxapi/group__Core.html +1 -1
  56. data/doc/cxxapi/group__Core.png +0 -0
  57. data/doc/cxxapi/group__Exceptions.html +1 -1
  58. data/doc/cxxapi/group__Hooks.html +1 -1
  59. data/doc/cxxapi/group__Hooks.png +0 -0
  60. data/doc/cxxapi/group__Support.html +1 -1
  61. data/doc/cxxapi/hierarchy.html +1 -1
  62. data/doc/cxxapi/inherit__graph__0.png +0 -0
  63. data/doc/cxxapi/inherit__graph__1.png +0 -0
  64. data/doc/cxxapi/inherit__graph__2.png +0 -0
  65. data/doc/cxxapi/inherit__graph__3.png +0 -0
  66. data/doc/cxxapi/inherit__graph__4.png +0 -0
  67. data/doc/cxxapi/inherit__graph__5.png +0 -0
  68. data/doc/cxxapi/inherit__graph__6.png +0 -0
  69. data/doc/cxxapi/inherit__graph__7.png +0 -0
  70. data/doc/cxxapi/inherit__graph__8.png +0 -0
  71. data/doc/cxxapi/inherit__graph__9.png +0 -0
  72. data/doc/cxxapi/inherits.html +1 -1
  73. data/doc/cxxapi/main.html +1 -1
  74. data/doc/cxxapi/modules.html +1 -1
  75. data/doc/cxxapi/structPassenger_1_1AnythingToString-members.html +1 -1
  76. data/doc/cxxapi/structPassenger_1_1AnythingToString.html +1 -1
  77. data/doc/cxxapi/structPassenger_1_1AnythingToString_3_01vector_3_01string_01_4_01_4-members.html +1 -1
  78. data/doc/cxxapi/structPassenger_1_1AnythingToString_3_01vector_3_01string_01_4_01_4.html +1 -1
  79. data/doc/rdoc/created.rid +1 -1
  80. data/doc/rdoc/files/DEVELOPERS_TXT.html +1 -1
  81. data/doc/rdoc/files/ext/passenger/native_support_c.html +1 -1
  82. data/doc/rdoc/files/lib/passenger/abstract_server_rb.html +1 -1
  83. data/doc/rdoc/files/lib/passenger/application_spawner_rb.html +1 -1
  84. data/doc/rdoc/files/lib/passenger/dependencies_rb.html +1 -1
  85. data/doc/rdoc/files/lib/passenger/framework_spawner_rb.html +1 -1
  86. data/doc/rdoc/files/lib/passenger/request_handler_rb.html +1 -1
  87. data/doc/rdoc/files/lib/passenger/spawn_manager_rb.html +1 -1
  88. data/doc/rdoc/files/lib/passenger/utils_rb.html +1 -1
  89. data/ext/apache2/Configuration.h +1 -1
  90. data/ext/apache2/MessageChannel.h +37 -11
  91. data/ext/passenger/native_support.c +36 -10
  92. data/lib/passenger/templates/app_exited_during_initialization.html.erb +3 -2
  93. data/lib/passenger/templates/welcome.txt.erb +1 -1
  94. data/misc/render_error_pages.rb +3 -0
  95. data/test/stub/{mycook → rails_apps/mycook}/config/environments/test.rb +0 -0
  96. metadata +12 -14
  97. data/test/stub/apache2/httpd.conf +0 -75
  98. data/test/stub/railsapp-without-version-spec/config/environments/test.rb +0 -22
@@ -44,7 +44,7 @@ This inheritance list is sorted roughly, but not completely, alphabetically:<ul>
44
44
  <li><a class="el" href="classPassenger_1_1MessageChannel.html">Passenger::MessageChannel</a>
45
45
  <li><a class="el" href="classPassenger_1_1SpawnManager.html">Passenger::SpawnManager</a>
46
46
  </ul>
47
- <hr size="1"><address style="text-align: right;"><small>Generated on Thu May 1 20:23:46 2008 for Passenger by&nbsp;
47
+ <hr size="1"><address style="text-align: right;"><small>Generated on Wed May 7 20:28:19 2008 for Passenger by&nbsp;
48
48
  <a href="http://www.doxygen.org/index.html">
49
49
  <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.3 </small></address>
50
50
  </body>
@@ -54,7 +54,7 @@
54
54
  <map name="Passenger_1_1SpawnManager_map">
55
55
  <area shape="rect" href="classPassenger_1_1SpawnManager.html" title="Passenger::SpawnManager" alt="" coords="7,5,204,32"></map></td></tr>
56
56
  </table>
57
- <hr size="1"><address style="text-align: right;"><small>Generated on Thu May 1 20:23:46 2008 for Passenger by&nbsp;
57
+ <hr size="1"><address style="text-align: right;"><small>Generated on Wed May 7 20:28:19 2008 for Passenger by&nbsp;
58
58
  <a href="http://www.doxygen.org/index.html">
59
59
  <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.3 </small></address>
60
60
  </body>
@@ -15,7 +15,7 @@
15
15
  </div>
16
16
  <h1>Passenger Documentation</h1>
17
17
  <p>
18
- <hr size="1"><address style="text-align: right;"><small>Generated on Thu May 1 20:23:46 2008 for Passenger by&nbsp;
18
+ <hr size="1"><address style="text-align: right;"><small>Generated on Wed May 7 20:28:18 2008 for Passenger by&nbsp;
19
19
  <a href="http://www.doxygen.org/index.html">
20
20
  <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.3 </small></address>
21
21
  </body>
@@ -22,7 +22,7 @@
22
22
  <li><a class="el" href="group__Support.html">Apache-independent support classes and function</a>
23
23
  <li><a class="el" href="group__Exceptions.html">Exceptions</a>
24
24
  </ul>
25
- <hr size="1"><address style="text-align: right;"><small>Generated on Thu May 1 20:23:46 2008 for Passenger by&nbsp;
25
+ <hr size="1"><address style="text-align: right;"><small>Generated on Wed May 7 20:28:19 2008 for Passenger by&nbsp;
26
26
  <a href="http://www.doxygen.org/index.html">
27
27
  <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.3 </small></address>
28
28
  </body>
@@ -21,7 +21,7 @@
21
21
  </ul>
22
22
  </div>
23
23
  <h1>Passenger::AnythingToString&lt; T &gt; Member List</h1>This is the complete list of members for <a class="el" href="structPassenger_1_1AnythingToString.html">Passenger::AnythingToString&lt; T &gt;</a>, including all inherited members.<p><table>
24
- </table><hr size="1"><address style="text-align: right;"><small>Generated on Thu May 1 20:23:47 2008 for Passenger by&nbsp;
24
+ </table><hr size="1"><address style="text-align: right;"><small>Generated on Wed May 7 20:28:20 2008 for Passenger by&nbsp;
25
25
  <a href="http://www.doxygen.org/index.html">
26
26
  <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.3 </small></address>
27
27
  </body>
@@ -37,7 +37,7 @@ Do not use directly. <table border="0" cellpadding="0" cellspacing="0">
37
37
  </table>
38
38
  <hr>The documentation for this struct was generated from the following file:<ul>
39
39
  <li><a class="el" href="Utils_8h-source.html">Utils.h</a></ul>
40
- <hr size="1"><address style="text-align: right;"><small>Generated on Thu May 1 20:23:47 2008 for Passenger by&nbsp;
40
+ <hr size="1"><address style="text-align: right;"><small>Generated on Wed May 7 20:28:20 2008 for Passenger by&nbsp;
41
41
  <a href="http://www.doxygen.org/index.html">
42
42
  <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.3 </small></address>
43
43
  </body>
@@ -21,7 +21,7 @@
21
21
  </ul>
22
22
  </div>
23
23
  <h1>Passenger::AnythingToString&lt; vector&lt; string &gt; &gt; Member List</h1>This is the complete list of members for <a class="el" href="structPassenger_1_1AnythingToString_3_01vector_3_01string_01_4_01_4.html">Passenger::AnythingToString&lt; vector&lt; string &gt; &gt;</a>, including all inherited members.<p><table>
24
- </table><hr size="1"><address style="text-align: right;"><small>Generated on Thu May 1 20:23:47 2008 for Passenger by&nbsp;
24
+ </table><hr size="1"><address style="text-align: right;"><small>Generated on Wed May 7 20:28:20 2008 for Passenger by&nbsp;
25
25
  <a href="http://www.doxygen.org/index.html">
26
26
  <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.3 </small></address>
27
27
  </body>
@@ -37,7 +37,7 @@ Do not use directly. <table border="0" cellpadding="0" cellspacing="0">
37
37
  </table>
38
38
  <hr>The documentation for this struct was generated from the following file:<ul>
39
39
  <li><a class="el" href="Utils_8h-source.html">Utils.h</a></ul>
40
- <hr size="1"><address style="text-align: right;"><small>Generated on Thu May 1 20:23:47 2008 for Passenger by&nbsp;
40
+ <hr size="1"><address style="text-align: right;"><small>Generated on Wed May 7 20:28:20 2008 for Passenger by&nbsp;
41
41
  <a href="http://www.doxygen.org/index.html">
42
42
  <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.3 </small></address>
43
43
  </body>
@@ -1 +1 @@
1
- Thu, 01 May 2008 20:23:41 +0200
1
+ Wed, 07 May 2008 20:28:13 +0200
@@ -63,7 +63,7 @@
63
63
  </tr>
64
64
  <tr>
65
65
  <td>Modified:</td>
66
- <td>Thu May 01 20:10:04 +0200 2008</td>
66
+ <td>Wed May 07 20:26:59 +0200 2008</td>
67
67
  </tr>
68
68
  </table>
69
69
  </td></tr>
@@ -63,7 +63,7 @@
63
63
  </tr>
64
64
  <tr>
65
65
  <td>Modified:</td>
66
- <td>Thu May 01 10:46:21 +0200 2008</td>
66
+ <td>Wed May 07 13:52:53 +0200 2008</td>
67
67
  </tr>
68
68
  </table>
69
69
  </td></tr>
@@ -63,7 +63,7 @@
63
63
  </tr>
64
64
  <tr>
65
65
  <td>Modified:</td>
66
- <td>Tue Apr 15 10:49:37 +0200 2008</td>
66
+ <td>Wed May 07 20:26:59 +0200 2008</td>
67
67
  </tr>
68
68
  </table>
69
69
  </td></tr>
@@ -63,7 +63,7 @@
63
63
  </tr>
64
64
  <tr>
65
65
  <td>Modified:</td>
66
- <td>Thu May 01 10:46:21 +0200 2008</td>
66
+ <td>Wed May 07 20:26:59 +0200 2008</td>
67
67
  </tr>
68
68
  </table>
69
69
  </td></tr>
@@ -63,7 +63,7 @@
63
63
  </tr>
64
64
  <tr>
65
65
  <td>Modified:</td>
66
- <td>Thu May 01 20:10:04 +0200 2008</td>
66
+ <td>Wed May 07 20:26:59 +0200 2008</td>
67
67
  </tr>
68
68
  </table>
69
69
  </td></tr>
@@ -63,7 +63,7 @@
63
63
  </tr>
64
64
  <tr>
65
65
  <td>Modified:</td>
66
- <td>Mon Apr 28 23:34:04 +0200 2008</td>
66
+ <td>Wed May 07 20:26:59 +0200 2008</td>
67
67
  </tr>
68
68
  </table>
69
69
  </td></tr>
@@ -63,7 +63,7 @@
63
63
  </tr>
64
64
  <tr>
65
65
  <td>Modified:</td>
66
- <td>Thu May 01 10:46:21 +0200 2008</td>
66
+ <td>Wed May 07 16:05:55 +0200 2008</td>
67
67
  </tr>
68
68
  </table>
69
69
  </td></tr>
@@ -63,7 +63,7 @@
63
63
  </tr>
64
64
  <tr>
65
65
  <td>Modified:</td>
66
- <td>Thu May 01 10:46:21 +0200 2008</td>
66
+ <td>Wed May 07 20:26:59 +0200 2008</td>
67
67
  </tr>
68
68
  </table>
69
69
  </td></tr>
@@ -63,7 +63,7 @@
63
63
  </tr>
64
64
  <tr>
65
65
  <td>Modified:</td>
66
- <td>Thu Apr 03 17:46:23 +0200 2008</td>
66
+ <td>Wed May 07 20:26:59 +0200 2008</td>
67
67
  </tr>
68
68
  </table>
69
69
  </td></tr>
@@ -29,7 +29,7 @@
29
29
  */
30
30
 
31
31
  /** Module version number. */
32
- #define PASSENGER_VERSION "1.0.4"
32
+ #define PASSENGER_VERSION "1.0.5"
33
33
 
34
34
  #ifdef __cplusplus
35
35
  #include <set>
@@ -259,7 +259,14 @@ public:
259
259
  struct msghdr msg;
260
260
  struct iovec vec;
261
261
  char dummy[1];
262
- char control_data[CMSG_SPACE(sizeof(int))];
262
+ #ifdef __APPLE__
263
+ struct {
264
+ struct cmsghdr header;
265
+ int fd;
266
+ } control_data;
267
+ #else
268
+ char control_data[CMSG_SPACE(sizeof(int))];
269
+ #endif
263
270
  struct cmsghdr *control_header;
264
271
 
265
272
  msg.msg_name = NULL;
@@ -272,15 +279,20 @@ public:
272
279
  msg.msg_iov = &vec;
273
280
  msg.msg_iovlen = 1;
274
281
 
275
- msg.msg_control = (caddr_t) control_data;
282
+ msg.msg_control = (caddr_t) &control_data;
276
283
  msg.msg_controllen = sizeof(control_data);
277
284
  msg.msg_flags = 0;
278
-
279
- control_header = CMSG_FIRSTHDR(&msg);
280
- control_header->cmsg_len = CMSG_LEN(sizeof(int));
285
+
286
+ control_header = CMSG_FIRSTHDR(&msg);
281
287
  control_header->cmsg_level = SOL_SOCKET;
282
288
  control_header->cmsg_type = SCM_RIGHTS;
283
- memcpy(CMSG_DATA(control_header), &fileDescriptor, sizeof(int));
289
+ #ifdef __APPLE__
290
+ control_header->cmsg_len = sizeof(control_data);
291
+ control_data.fd = fileDescriptor;
292
+ #else
293
+ control_header->cmsg_len = CMSG_LEN(sizeof(int));
294
+ memcpy(CMSG_DATA(control_header), &fileDescriptor, sizeof(int));
295
+ #endif
284
296
 
285
297
  if (sendmsg(fd, &msg, 0) == -1) {
286
298
  throw SystemException("Cannot send file descriptor with sendmsg()", errno);
@@ -423,7 +435,18 @@ public:
423
435
  struct msghdr msg;
424
436
  struct iovec vec;
425
437
  char dummy[1];
426
- char control_data[CMSG_SPACE(sizeof(int))];
438
+ #ifdef __APPLE__
439
+ // File descriptor passing macros (CMSG_*) seem to be broken
440
+ // on 64-bit MacOS X. This structure works around the problem.
441
+ struct {
442
+ struct cmsghdr header;
443
+ int fd;
444
+ } control_data;
445
+ #define EXPECTED_CMSG_LEN sizeof(control_data)
446
+ #else
447
+ char control_data[CMSG_SPACE(sizeof(int))];
448
+ #define EXPECTED_CMSG_LEN CMSG_LEN(sizeof(int))
449
+ #endif
427
450
  struct cmsghdr *control_header;
428
451
 
429
452
  msg.msg_name = NULL;
@@ -435,7 +458,7 @@ public:
435
458
  msg.msg_iov = &vec;
436
459
  msg.msg_iovlen = 1;
437
460
 
438
- msg.msg_control = (caddr_t) control_data;
461
+ msg.msg_control = (caddr_t) &control_data;
439
462
  msg.msg_controllen = sizeof(control_data);
440
463
  msg.msg_flags = 0;
441
464
 
@@ -444,13 +467,16 @@ public:
444
467
  }
445
468
 
446
469
  control_header = CMSG_FIRSTHDR(&msg);
447
- if (msg.msg_controllen != sizeof(control_data)
448
- || control_header->cmsg_len != CMSG_LEN(sizeof(int))
470
+ if (control_header->cmsg_len != EXPECTED_CMSG_LEN
449
471
  || control_header->cmsg_level != SOL_SOCKET
450
472
  || control_header->cmsg_type != SCM_RIGHTS) {
451
473
  throw IOException("No valid file descriptor received.");
452
474
  }
453
- return *((int *) CMSG_DATA(control_header));
475
+ #ifdef __APPLE__
476
+ return control_data.fd;
477
+ #else
478
+ return *((int *) CMSG_DATA(control_header));
479
+ #endif
454
480
  }
455
481
  };
456
482
 
@@ -43,7 +43,14 @@ send_fd(VALUE self, VALUE socket_fd, VALUE fd_to_send) {
43
43
  struct msghdr msg;
44
44
  struct iovec vec;
45
45
  char dummy[1];
46
- char control_data[CMSG_SPACE(sizeof(int))];
46
+ #ifdef __APPLE__
47
+ struct {
48
+ struct cmsghdr header;
49
+ int fd;
50
+ } control_data;
51
+ #else
52
+ char control_data[CMSG_SPACE(sizeof(int))];
53
+ #endif
47
54
  struct cmsghdr *control_header;
48
55
  int control_payload;
49
56
 
@@ -57,16 +64,21 @@ send_fd(VALUE self, VALUE socket_fd, VALUE fd_to_send) {
57
64
  msg.msg_iov = &vec;
58
65
  msg.msg_iovlen = 1;
59
66
 
60
- msg.msg_control = (caddr_t) control_data;
67
+ msg.msg_control = (caddr_t) &control_data;
61
68
  msg.msg_controllen = sizeof(control_data);
62
69
  msg.msg_flags = 0;
63
70
 
64
- control_header = CMSG_FIRSTHDR(&msg);
65
- control_header->cmsg_len = CMSG_LEN(sizeof(int));
71
+ control_header = CMSG_FIRSTHDR(&msg);
66
72
  control_header->cmsg_level = SOL_SOCKET;
67
73
  control_header->cmsg_type = SCM_RIGHTS;
68
74
  control_payload = NUM2INT(fd_to_send);
69
- memcpy(CMSG_DATA(control_header), &control_payload, sizeof(int));
75
+ #ifdef __APPLE__
76
+ control_header->cmsg_len = sizeof(control_data);
77
+ control_data.fd = control_payload;
78
+ #else
79
+ control_header->cmsg_len = CMSG_LEN(sizeof(int));
80
+ memcpy(CMSG_DATA(control_header), &control_payload, sizeof(int));
81
+ #endif
70
82
 
71
83
  if (sendmsg(NUM2INT(socket_fd), &msg, 0) == -1) {
72
84
  rb_sys_fail("sendmsg(2)");
@@ -91,7 +103,18 @@ recv_fd(VALUE self, VALUE socket_fd) {
91
103
  struct msghdr msg;
92
104
  struct iovec vec;
93
105
  char dummy[1];
94
- char control_data[CMSG_SPACE(sizeof(int))];
106
+ #ifdef __APPLE__
107
+ // File descriptor passing macros (CMSG_*) seem to be broken
108
+ // on 64-bit MacOS X. This structure works around the problem.
109
+ struct {
110
+ struct cmsghdr header;
111
+ int fd;
112
+ } control_data;
113
+ #define EXPECTED_CMSG_LEN sizeof(control_data)
114
+ #else
115
+ char control_data[CMSG_SPACE(sizeof(int))];
116
+ #define EXPECTED_CMSG_LEN CMSG_LEN(sizeof(int))
117
+ #endif
95
118
  struct cmsghdr *control_header;
96
119
 
97
120
  msg.msg_name = NULL;
@@ -103,7 +126,7 @@ recv_fd(VALUE self, VALUE socket_fd) {
103
126
  msg.msg_iov = &vec;
104
127
  msg.msg_iovlen = 1;
105
128
 
106
- msg.msg_control = (caddr_t) control_data;
129
+ msg.msg_control = (caddr_t) &control_data;
107
130
  msg.msg_controllen = sizeof(control_data);
108
131
  msg.msg_flags = 0;
109
132
 
@@ -113,14 +136,17 @@ recv_fd(VALUE self, VALUE socket_fd) {
113
136
  }
114
137
 
115
138
  control_header = CMSG_FIRSTHDR(&msg);
116
- if (msg.msg_controllen != sizeof(control_data)
117
- || control_header->cmsg_len != CMSG_LEN(sizeof(int))
139
+ if (control_header->cmsg_len != EXPECTED_CMSG_LEN
118
140
  || control_header->cmsg_level != SOL_SOCKET
119
141
  || control_header->cmsg_type != SCM_RIGHTS) {
120
142
  rb_sys_fail("No valid file descriptor received.");
121
143
  return Qnil;
122
144
  }
123
- return INT2NUM(*((int *) CMSG_DATA(control_header)));
145
+ #ifdef __APPLE__
146
+ return INT2NUM(control_data.fd);
147
+ #else
148
+ return INT2NUM(*((int *) CMSG_DATA(control_header)));
149
+ #endif
124
150
  }
125
151
 
126
152
  /*
@@ -4,8 +4,9 @@
4
4
 
5
5
  The application has exited during startup (i.e. during the evaluation of
6
6
  <tt>config/environment.rb</tt>). The error message may have been
7
- written to the web server's log file. Please check the web server's log file
8
- to find out why the application exited.
7
+ written to the web server's log file. Please check the <b>web server's</b>
8
+ log file (i.e. <em>not</em> the Rails log file) to find out why the application
9
+ exited.
9
10
 
10
11
  <dl>
11
12
  <dt>Application root:</dt>
@@ -1,4 +1,4 @@
1
- <banner>Welcome to the Passenger Apache 2 module installer.</banner>
1
+ <banner>Welcome to the Passenger Apache 2 module installer, v<%= @version %>.</banner>
2
2
 
3
3
  This installer will guide you through the entire installation process. It
4
4
  shouldn't take more than 3 minutes in total.
@@ -100,6 +100,9 @@ def start
100
100
  e = StandardError.new("Some error message")
101
101
  render_error_page(e, 'general_error.html',
102
102
  'general_error')
103
+
104
+ e = StandardError.new("Some error message")
105
+ render_error_page(e, 'app_exited.html', 'app_exited_during_initialization')
103
106
  end
104
107
 
105
108
  start
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: passenger
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.4
4
+ version: 1.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Phusion - http://www.phusion.nl/
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2008-05-01 00:00:00 +02:00
12
+ date: 2008-05-07 00:00:00 +02:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -1928,7 +1928,6 @@ files:
1928
1928
  - test/stub/railsapp-without-version-spec/config
1929
1929
  - test/stub/railsapp-without-version-spec/app
1930
1930
  - test/stub/railsapp-without-version-spec/tmp
1931
- - test/stub/railsapp-without-version-spec/vendor
1932
1931
  - test/stub/railsapp/log
1933
1932
  - test/stub/railsapp/public
1934
1933
  - test/stub/railsapp/config
@@ -1943,7 +1942,6 @@ files:
1943
1942
  - test/stub/mycook/config
1944
1943
  - test/stub/mycook/app
1945
1944
  - test/stub/mycook/tmp
1946
- - test/stub/mycook/lib
1947
1945
  - test/stub/broken-railsapp/public
1948
1946
  - test/stub/broken-railsapp/config
1949
1947
  - test/stub/minimal-railsapp/config
@@ -1951,7 +1949,6 @@ files:
1951
1949
  - test/stub/minimal-railsapp/vendor
1952
1950
  - test/stub/broken-railsapp2/config
1953
1951
  - test/stub/apache2/httpd.conf.erb
1954
- - test/stub/apache2/httpd.conf
1955
1952
  - test/stub/apache2/mime.types
1956
1953
  - test/stub/broken-railsapp3/config
1957
1954
  - test/stub/railsapp2/log
@@ -1960,6 +1957,7 @@ files:
1960
1957
  - test/stub/railsapp2/app
1961
1958
  - test/stub/railsapp2/tmp
1962
1959
  - test/stub/railsapp2/vendor
1960
+ - test/stub/rails_apps/mycook
1963
1961
  - test/stub/rails_apps/foobar
1964
1962
  - test/stub/broken-railsapp5/public
1965
1963
  - test/stub/broken-railsapp5/config
@@ -1975,13 +1973,10 @@ files:
1975
1973
  - test/stub/railsapp-without-version-spec/config/boot.rb
1976
1974
  - test/stub/railsapp-without-version-spec/app/controllers
1977
1975
  - test/stub/railsapp-without-version-spec/app/helpers
1978
- - test/stub/railsapp-without-version-spec/app/models
1979
- - test/stub/railsapp-without-version-spec/app/views
1980
1976
  - test/stub/railsapp-without-version-spec/tmp/pids
1981
1977
  - test/stub/railsapp-without-version-spec/tmp/cache
1982
1978
  - test/stub/railsapp-without-version-spec/tmp/sessions
1983
1979
  - test/stub/railsapp-without-version-spec/tmp/sockets
1984
- - test/stub/railsapp-without-version-spec/vendor/plugins
1985
1980
  - test/stub/railsapp/public/useless.txt
1986
1981
  - test/stub/railsapp/config/environment.rb
1987
1982
  - test/stub/railsapp/config/database.yml
@@ -2001,7 +1996,6 @@ files:
2001
1996
  - test/stub/mycook/public/robots.txt
2002
1997
  - test/stub/mycook/public/422.html
2003
1998
  - test/stub/mycook/public/dispatch.rb
2004
- - test/stub/mycook/public/stylesheets
2005
1999
  - test/stub/mycook/public/dispatch.cgi
2006
2000
  - test/stub/mycook/public/images
2007
2001
  - test/stub/mycook/public/welcome
@@ -2019,13 +2013,11 @@ files:
2019
2013
  - test/stub/mycook/config/boot.rb
2020
2014
  - test/stub/mycook/app/controllers
2021
2015
  - test/stub/mycook/app/helpers
2022
- - test/stub/mycook/app/models
2023
2016
  - test/stub/mycook/app/views
2024
2017
  - test/stub/mycook/tmp/pids
2025
2018
  - test/stub/mycook/tmp/cache
2026
2019
  - test/stub/mycook/tmp/sessions
2027
2020
  - test/stub/mycook/tmp/sockets
2028
- - test/stub/mycook/lib/tasks
2029
2021
  - test/stub/broken-railsapp/public/useless.txt
2030
2022
  - test/stub/broken-railsapp/config/environment.rb
2031
2023
  - test/stub/minimal-railsapp/config/environment.rb
@@ -2049,13 +2041,16 @@ files:
2049
2041
  - test/stub/railsapp2/tmp/sessions
2050
2042
  - test/stub/railsapp2/tmp/sockets
2051
2043
  - test/stub/railsapp2/vendor/plugins
2044
+ - test/stub/rails_apps/mycook/public
2045
+ - test/stub/rails_apps/mycook/config
2046
+ - test/stub/rails_apps/mycook/app
2047
+ - test/stub/rails_apps/mycook/lib
2052
2048
  - test/stub/rails_apps/foobar/config
2053
2049
  - test/stub/rails_apps/foobar/app
2054
2050
  - test/stub/rails_apps/foobar/vendor
2055
2051
  - test/stub/broken-railsapp5/public/useless.txt
2056
2052
  - test/stub/broken-railsapp5/config/environment.rb
2057
2053
  - test/stub/broken-railsapp5/vendor/rails
2058
- - test/stub/railsapp-without-version-spec/config/environments/test.rb
2059
2054
  - test/stub/railsapp-without-version-spec/config/environments/development.rb
2060
2055
  - test/stub/railsapp-without-version-spec/config/environments/production.rb
2061
2056
  - test/stub/railsapp-without-version-spec/config/initializers/inflections.rb
@@ -2063,7 +2058,6 @@ files:
2063
2058
  - test/stub/railsapp-without-version-spec/app/controllers/foo_controller.rb
2064
2059
  - test/stub/railsapp-without-version-spec/app/controllers/application.rb
2065
2060
  - test/stub/railsapp-without-version-spec/app/helpers/application_helper.rb
2066
- - test/stub/railsapp-without-version-spec/app/views/layouts
2067
2061
  - test/stub/railsapp/config/environments/test.rb
2068
2062
  - test/stub/railsapp/config/environments/development.rb
2069
2063
  - test/stub/railsapp/config/environments/production.rb
@@ -2085,7 +2079,6 @@ files:
2085
2079
  - test/stub/mycook/public/javascripts/application.js
2086
2080
  - test/stub/mycook/public/javascripts/dragdrop.js
2087
2081
  - test/stub/mycook/public/javascripts/controls.js
2088
- - test/stub/mycook/config/environments/test.rb
2089
2082
  - test/stub/mycook/config/environments/development.rb
2090
2083
  - test/stub/mycook/config/environments/production.rb
2091
2084
  - test/stub/mycook/config/initializers/inflections.rb
@@ -2114,6 +2107,10 @@ files:
2114
2107
  - test/stub/railsapp2/app/controllers/application.rb
2115
2108
  - test/stub/railsapp2/app/helpers/application_helper.rb
2116
2109
  - test/stub/railsapp2/app/views/layouts
2110
+ - test/stub/rails_apps/mycook/public/stylesheets
2111
+ - test/stub/rails_apps/mycook/config/environments
2112
+ - test/stub/rails_apps/mycook/app/models
2113
+ - test/stub/rails_apps/mycook/lib/tasks
2117
2114
  - test/stub/rails_apps/foobar/config/environments
2118
2115
  - test/stub/rails_apps/foobar/app/models
2119
2116
  - test/stub/rails_apps/foobar/app/views
@@ -2138,6 +2135,7 @@ files:
2138
2135
  - test/stub/minimal-railsapp/vendor/rails/activesupport/lib
2139
2136
  - test/stub/minimal-railsapp/vendor/rails/activerecord/lib
2140
2137
  - test/stub/minimal-railsapp/vendor/rails/activeresource/lib
2138
+ - test/stub/rails_apps/mycook/config/environments/test.rb
2141
2139
  - test/stub/rails_apps/foobar/config/environments/test.rb
2142
2140
  - test/stub/rails_apps/foobar/app/views/layouts
2143
2141
  - test/stub/broken-railsapp5/vendor/rails/railties/lib