passenger 2.0.6 → 2.1.2
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.
- data/DEVELOPERS.TXT +10 -4
- data/LICENSE +1 -1
- data/NEWS +0 -0
- data/Rakefile +183 -117
- data/benchmark/dispatcher.rb +5 -9
- data/bin/passenger-install-apache2-module +52 -18
- data/bin/passenger-memory-stats +67 -13
- data/bin/passenger-spawn-server +8 -4
- data/bin/passenger-status +21 -46
- data/bin/passenger-stress-test +5 -5
- data/debian/postinst +1 -1
- data/doc/ApplicationPool algorithm.txt +180 -128
- data/doc/Architectural overview.html +1 -778
- data/doc/Security of user switching support.html +1 -643
- data/doc/Users guide Apache.html +3127 -0
- data/doc/Users guide Nginx.html +1458 -0
- data/doc/Users guide.html +1404 -467
- data/doc/Users guide.txt +843 -105
- data/doc/cxxapi/ApplicationPoolServer_8h-source.html +751 -641
- data/doc/cxxapi/ApplicationPool_8h-source.html +168 -171
- data/doc/cxxapi/Application_8h-source.html +494 -394
- data/doc/cxxapi/Bucket_8h-source.html +21 -15
- data/doc/cxxapi/CachedFileStat_8h-source.html +191 -0
- data/doc/cxxapi/Configuration_8h-source.html +311 -149
- data/doc/cxxapi/DirectoryMapper_8h-source.html +309 -0
- data/doc/cxxapi/DummySpawnManager_8h-source.html +3 -4
- data/doc/cxxapi/Exceptions_8h-source.html +182 -165
- data/doc/cxxapi/FileChecker_8h-source.html +130 -0
- data/doc/cxxapi/Hooks_8h-source.html +2 -3
- data/doc/cxxapi/Logging_8h-source.html +92 -89
- data/doc/cxxapi/MessageChannel_8h-source.html +585 -477
- data/doc/cxxapi/PoolOptions_8h-source.html +305 -0
- data/doc/cxxapi/SpawnManager_8h-source.html +515 -540
- data/doc/cxxapi/StandardApplicationPool_8h-source.html +779 -679
- data/doc/cxxapi/SystemTime_8h-source.html +104 -0
- data/doc/cxxapi/Utils_8h-source.html +331 -227
- data/doc/cxxapi/annotated.html +6 -7
- data/doc/cxxapi/classClient-members.html +1 -2
- data/doc/cxxapi/classClient.html +1 -2
- data/doc/cxxapi/classHooks-members.html +5 -2
- data/doc/cxxapi/classHooks.html +112 -2
- data/doc/cxxapi/classPassenger_1_1Application-members.html +2 -3
- data/doc/cxxapi/classPassenger_1_1Application.html +8 -9
- data/doc/cxxapi/classPassenger_1_1ApplicationPool-members.html +4 -4
- data/doc/cxxapi/classPassenger_1_1ApplicationPool.html +42 -81
- data/doc/cxxapi/classPassenger_1_1ApplicationPoolServer-members.html +1 -2
- data/doc/cxxapi/classPassenger_1_1ApplicationPoolServer.html +3 -4
- data/doc/cxxapi/classPassenger_1_1ApplicationPool__inherit__graph.png +0 -0
- data/doc/cxxapi/classPassenger_1_1Application_1_1Session-members.html +3 -2
- data/doc/cxxapi/classPassenger_1_1Application_1_1Session.html +74 -3
- data/doc/cxxapi/classPassenger_1_1BusyException-members.html +1 -2
- data/doc/cxxapi/classPassenger_1_1BusyException.html +2 -3
- data/doc/cxxapi/classPassenger_1_1ConfigurationException-members.html +1 -2
- data/doc/cxxapi/classPassenger_1_1ConfigurationException.html +2 -3
- data/doc/cxxapi/classPassenger_1_1DirectoryMapper-members.html +38 -0
- data/doc/cxxapi/classPassenger_1_1DirectoryMapper.html +256 -0
- data/doc/cxxapi/classPassenger_1_1DummySpawnManager-members.html +1 -2
- data/doc/cxxapi/classPassenger_1_1DummySpawnManager.html +2 -3
- data/doc/cxxapi/{classPassenger_1_1Thread-members.html → classPassenger_1_1FileChecker-members.html} +4 -5
- data/doc/cxxapi/classPassenger_1_1FileChecker.html +121 -0
- data/doc/cxxapi/classPassenger_1_1FileNotFoundException-members.html +1 -2
- data/doc/cxxapi/classPassenger_1_1FileNotFoundException.html +2 -3
- data/doc/cxxapi/classPassenger_1_1FileNotFoundException__inherit__graph.png +0 -0
- data/doc/cxxapi/classPassenger_1_1FileSystemException-members.html +2 -3
- data/doc/cxxapi/classPassenger_1_1FileSystemException.html +2 -3
- data/doc/cxxapi/classPassenger_1_1FileSystemException__inherit__graph.png +0 -0
- data/doc/cxxapi/classPassenger_1_1IOException-members.html +1 -2
- data/doc/cxxapi/classPassenger_1_1IOException.html +2 -3
- data/doc/cxxapi/classPassenger_1_1IOException__inherit__graph.png +0 -0
- data/doc/cxxapi/classPassenger_1_1MessageChannel-members.html +5 -2
- data/doc/cxxapi/classPassenger_1_1MessageChannel.html +155 -5
- data/doc/cxxapi/{classboost_1_1this__thread_1_1enable__syscall__interruption-members.html → classPassenger_1_1RuntimeException-members.html} +2 -3
- data/doc/cxxapi/{classboost_1_1this__thread_1_1enable__syscall__interruption.html → classPassenger_1_1RuntimeException.html} +10 -8
- data/doc/cxxapi/classPassenger_1_1SpawnException-members.html +1 -2
- data/doc/cxxapi/classPassenger_1_1SpawnException.html +2 -3
- data/doc/cxxapi/classPassenger_1_1SpawnManager-members.html +2 -3
- data/doc/cxxapi/classPassenger_1_1SpawnManager.html +15 -56
- data/doc/cxxapi/classPassenger_1_1StandardApplicationPool-members.html +5 -4
- data/doc/cxxapi/classPassenger_1_1StandardApplicationPool.html +20 -81
- data/doc/cxxapi/classPassenger_1_1StandardApplicationPool__inherit__graph.png +0 -0
- data/doc/cxxapi/classPassenger_1_1SystemException-members.html +2 -3
- data/doc/cxxapi/classPassenger_1_1SystemException.html +9 -10
- data/doc/cxxapi/classPassenger_1_1SystemException__inherit__graph.png +0 -0
- data/doc/cxxapi/{classboost_1_1this__thread_1_1disable__syscall__interruption-members.html → classPassenger_1_1SystemTime-members.html} +5 -3
- data/doc/cxxapi/classPassenger_1_1SystemTime.html +86 -0
- data/doc/cxxapi/classPassenger_1_1TempFile-members.html +2 -3
- data/doc/cxxapi/classPassenger_1_1TempFile.html +17 -9
- data/doc/cxxapi/definitions_8h-source.html +1 -2
- data/doc/cxxapi/files.html +6 -3
- data/doc/cxxapi/functions.html +98 -35
- data/doc/cxxapi/functions_func.html +60 -32
- data/doc/cxxapi/functions_type.html +1 -2
- data/doc/cxxapi/functions_vars.html +27 -2
- data/doc/cxxapi/graph_legend.html +1 -2
- data/doc/cxxapi/graph_legend.png +0 -0
- data/doc/cxxapi/group__Configuration.html +3 -4
- data/doc/cxxapi/group__Configuration.png +0 -0
- data/doc/cxxapi/group__Core.html +3 -4
- data/doc/cxxapi/group__Core.png +0 -0
- data/doc/cxxapi/group__Exceptions.html +4 -2
- data/doc/cxxapi/group__Hooks.html +1 -6
- data/doc/cxxapi/group__Hooks.png +0 -0
- data/doc/cxxapi/group__Support.html +259 -36
- data/doc/cxxapi/hierarchy.html +6 -7
- data/doc/cxxapi/inherit__graph__0.map +1 -1
- data/doc/cxxapi/inherit__graph__0.md5 +1 -1
- data/doc/cxxapi/inherit__graph__0.png +0 -0
- data/doc/cxxapi/inherit__graph__1.map +1 -1
- data/doc/cxxapi/inherit__graph__1.md5 +1 -1
- data/doc/cxxapi/inherit__graph__1.png +0 -0
- data/doc/cxxapi/inherit__graph__10.map +1 -1
- data/doc/cxxapi/inherit__graph__10.md5 +1 -1
- data/doc/cxxapi/inherit__graph__10.png +0 -0
- data/doc/cxxapi/inherit__graph__11.map +1 -1
- data/doc/cxxapi/inherit__graph__11.md5 +1 -1
- data/doc/cxxapi/inherit__graph__11.png +0 -0
- data/doc/cxxapi/inherit__graph__12.map +2 -1
- data/doc/cxxapi/inherit__graph__12.md5 +1 -1
- data/doc/cxxapi/inherit__graph__12.png +0 -0
- data/doc/cxxapi/inherit__graph__13.map +1 -1
- data/doc/cxxapi/inherit__graph__13.md5 +1 -1
- data/doc/cxxapi/inherit__graph__13.png +0 -0
- data/doc/cxxapi/inherit__graph__14.map +1 -2
- data/doc/cxxapi/inherit__graph__14.md5 +1 -1
- data/doc/cxxapi/inherit__graph__14.png +0 -0
- data/doc/cxxapi/inherit__graph__15.map +1 -1
- data/doc/cxxapi/inherit__graph__15.md5 +1 -1
- data/doc/cxxapi/inherit__graph__15.png +0 -0
- data/doc/cxxapi/inherit__graph__16.map +1 -1
- data/doc/cxxapi/inherit__graph__16.md5 +1 -1
- data/doc/cxxapi/inherit__graph__16.png +0 -0
- data/doc/cxxapi/inherit__graph__17.png +0 -0
- data/doc/cxxapi/inherit__graph__18.png +0 -0
- data/doc/cxxapi/inherit__graph__19.png +0 -0
- data/doc/cxxapi/inherit__graph__2.map +1 -1
- data/doc/cxxapi/inherit__graph__2.md5 +1 -1
- data/doc/cxxapi/inherit__graph__2.png +0 -0
- data/doc/cxxapi/inherit__graph__20.map +1 -1
- data/doc/cxxapi/inherit__graph__20.md5 +1 -1
- data/doc/cxxapi/inherit__graph__20.png +0 -0
- data/doc/cxxapi/inherit__graph__21.map +1 -1
- data/doc/cxxapi/inherit__graph__21.md5 +1 -1
- data/doc/cxxapi/inherit__graph__21.png +0 -0
- data/doc/cxxapi/inherit__graph__3.map +1 -1
- data/doc/cxxapi/inherit__graph__3.md5 +1 -1
- data/doc/cxxapi/inherit__graph__3.png +0 -0
- data/doc/cxxapi/inherit__graph__4.map +1 -1
- data/doc/cxxapi/inherit__graph__4.md5 +1 -1
- data/doc/cxxapi/inherit__graph__4.png +0 -0
- data/doc/cxxapi/inherit__graph__5.map +2 -1
- data/doc/cxxapi/inherit__graph__5.md5 +1 -1
- data/doc/cxxapi/inherit__graph__5.png +0 -0
- data/doc/cxxapi/inherit__graph__6.map +1 -1
- data/doc/cxxapi/inherit__graph__6.md5 +1 -1
- data/doc/cxxapi/inherit__graph__6.png +0 -0
- data/doc/cxxapi/inherit__graph__7.map +1 -1
- data/doc/cxxapi/inherit__graph__7.md5 +1 -1
- data/doc/cxxapi/inherit__graph__7.png +0 -0
- data/doc/cxxapi/inherit__graph__8.map +1 -1
- data/doc/cxxapi/inherit__graph__8.md5 +1 -1
- data/doc/cxxapi/inherit__graph__8.png +0 -0
- data/doc/cxxapi/inherit__graph__9.map +1 -2
- data/doc/cxxapi/inherit__graph__9.md5 +1 -1
- data/doc/cxxapi/inherit__graph__9.png +0 -0
- data/doc/cxxapi/inherits.html +30 -31
- data/doc/cxxapi/main.html +1 -2
- data/doc/cxxapi/modules.html +1 -2
- data/doc/cxxapi/structPassenger_1_1AnythingToString-members.html +1 -2
- data/doc/cxxapi/structPassenger_1_1AnythingToString.html +2 -3
- data/doc/cxxapi/structPassenger_1_1AnythingToString_3_01vector_3_01string_01_4_01_4-members.html +1 -2
- data/doc/cxxapi/structPassenger_1_1AnythingToString_3_01vector_3_01string_01_4_01_4.html +2 -3
- data/doc/cxxapi/structPassenger_1_1PoolOptions-members.html +49 -0
- data/doc/cxxapi/structPassenger_1_1PoolOptions.html +404 -0
- data/doc/cxxapi/tree.html +18 -20
- data/doc/images/conservative_spawning.png +0 -0
- data/doc/images/conservative_spawning.svg +248 -0
- data/doc/images/smart-lv2.png +0 -0
- data/doc/images/smart-lv2.svg +320 -0
- data/doc/rdoc/classes/ConditionVariable.html +68 -34
- data/doc/rdoc/classes/Exception.html +16 -16
- data/doc/rdoc/classes/GC.html +9 -9
- data/doc/rdoc/classes/IO.html +36 -17
- data/doc/rdoc/classes/PhusionPassenger.html +183 -0
- data/doc/rdoc/classes/PhusionPassenger/AbstractRequestHandler.html +511 -0
- data/doc/rdoc/classes/{Passenger → PhusionPassenger}/AbstractServer.html +285 -242
- data/doc/rdoc/classes/{Passenger → PhusionPassenger}/AbstractServer/ServerAlreadyStarted.html +3 -3
- data/doc/rdoc/classes/{Passenger → PhusionPassenger}/AbstractServer/ServerError.html +3 -3
- data/doc/rdoc/classes/{Passenger → PhusionPassenger}/AbstractServer/ServerNotStarted.html +3 -3
- data/doc/rdoc/classes/{Passenger → PhusionPassenger}/AbstractServer/UnknownMessage.html +3 -3
- data/doc/rdoc/classes/PhusionPassenger/AbstractServerCollection.html +598 -0
- data/doc/rdoc/classes/PhusionPassenger/AdminTools.html +140 -0
- data/doc/rdoc/classes/PhusionPassenger/AdminTools/ControlProcess.html +247 -0
- data/doc/rdoc/classes/PhusionPassenger/AdminTools/ControlProcess/Instance.html +138 -0
- data/doc/rdoc/classes/{Passenger → PhusionPassenger}/AppInitError.html +36 -19
- data/doc/rdoc/classes/{Passenger → PhusionPassenger}/Application.html +81 -96
- data/doc/rdoc/classes/{Passenger → PhusionPassenger}/ConsoleTextTemplate.html +18 -18
- data/doc/rdoc/classes/{Passenger → PhusionPassenger}/FrameworkInitError.html +20 -18
- data/doc/rdoc/classes/{Passenger → PhusionPassenger}/HTMLTemplate.html +18 -18
- data/doc/rdoc/classes/{Passenger → PhusionPassenger}/InitializationError.html +9 -9
- data/doc/rdoc/classes/PhusionPassenger/InvalidPath.html +92 -0
- data/doc/rdoc/classes/{Passenger → PhusionPassenger}/MessageChannel.html +93 -92
- data/doc/rdoc/classes/{Passenger → PhusionPassenger}/NativeSupport.html +55 -25
- data/doc/rdoc/classes/PhusionPassenger/Rack.html +91 -0
- data/doc/rdoc/classes/PhusionPassenger/Rack/ApplicationSpawner.html +185 -0
- data/doc/rdoc/classes/PhusionPassenger/Rack/RequestHandler.html +182 -0
- data/doc/rdoc/classes/PhusionPassenger/Railz.html +95 -0
- data/doc/rdoc/classes/PhusionPassenger/Railz/ApplicationSpawner.html +424 -0
- data/doc/rdoc/classes/PhusionPassenger/Railz/ApplicationSpawner/Error.html +98 -0
- data/doc/rdoc/classes/PhusionPassenger/Railz/CGIFixed.html +200 -0
- data/doc/rdoc/classes/PhusionPassenger/Railz/FrameworkSpawner.html +444 -0
- data/doc/rdoc/classes/PhusionPassenger/Railz/FrameworkSpawner/Error.html +98 -0
- data/doc/rdoc/classes/PhusionPassenger/Railz/RequestHandler.html +154 -0
- data/doc/rdoc/classes/PhusionPassenger/SpawnManager.html +408 -0
- data/doc/rdoc/classes/{Passenger → PhusionPassenger}/UnknownError.html +13 -13
- data/doc/rdoc/classes/PhusionPassenger/Utils.html +687 -0
- data/doc/rdoc/classes/{Passenger → PhusionPassenger}/VersionNotFound.html +8 -8
- data/doc/rdoc/classes/PhusionPassenger/WSGI.html +89 -0
- data/doc/rdoc/classes/PhusionPassenger/WSGI/ApplicationSpawner.html +188 -0
- data/doc/rdoc/classes/PlatformInfo.html +663 -159
- data/doc/rdoc/classes/RakeExtensions.html +4 -4
- data/doc/rdoc/classes/Signal.html +134 -0
- data/doc/rdoc/created.rid +1 -1
- data/doc/rdoc/files/DEVELOPERS_TXT.html +15 -10
- data/doc/rdoc/files/README.html +5 -7
- data/doc/rdoc/files/ext/{passenger → phusion_passenger}/native_support_c.html +2 -2
- data/doc/rdoc/files/lib/{passenger → phusion_passenger}/abstract_request_handler_rb.html +7 -9
- data/doc/rdoc/files/lib/phusion_passenger/abstract_server_collection_rb.html +120 -0
- data/doc/rdoc/files/lib/{passenger → phusion_passenger}/abstract_server_rb.html +7 -10
- data/doc/rdoc/files/lib/phusion_passenger/admin_tools/control_process_rb.html +99 -0
- data/doc/rdoc/files/lib/phusion_passenger/admin_tools_rb.html +92 -0
- data/doc/rdoc/files/lib/{passenger → phusion_passenger}/application_rb.html +6 -8
- data/doc/rdoc/files/lib/{passenger → phusion_passenger}/console_text_template_rb.html +5 -7
- data/doc/rdoc/files/lib/{passenger → phusion_passenger}/constants_rb.html +4 -5
- data/doc/rdoc/files/lib/{passenger → phusion_passenger}/dependencies_rb.html +6 -8
- data/doc/rdoc/files/lib/phusion_passenger/events_rb.html +116 -0
- data/doc/rdoc/files/lib/{passenger → phusion_passenger}/exceptions_rb.html +5 -7
- data/doc/rdoc/files/lib/{passenger → phusion_passenger}/html_template_rb.html +5 -7
- data/doc/rdoc/files/lib/{passenger → phusion_passenger}/message_channel_rb.html +5 -7
- data/doc/rdoc/files/lib/{passenger → phusion_passenger}/platform_info_rb.html +6 -7
- data/doc/rdoc/files/lib/phusion_passenger/rack/application_spawner_rb.html +123 -0
- data/doc/rdoc/files/lib/phusion_passenger/rack/request_handler_rb.html +117 -0
- data/doc/rdoc/files/lib/{passenger/utils_rb.html → phusion_passenger/railz/application_spawner_rb.html} +24 -17
- data/doc/rdoc/files/lib/phusion_passenger/railz/cgi_fixed_rb.html +126 -0
- data/doc/rdoc/files/lib/phusion_passenger/railz/framework_spawner_rb.html +139 -0
- data/doc/rdoc/files/lib/phusion_passenger/railz/request_handler_rb.html +118 -0
- data/doc/rdoc/files/lib/{passenger → phusion_passenger}/simple_benchmarking_rb.html +5 -7
- data/doc/rdoc/files/lib/{passenger → phusion_passenger}/spawn_manager_rb.html +40 -24
- data/doc/rdoc/files/lib/phusion_passenger/utils_rb.html +169 -0
- data/doc/rdoc/files/lib/phusion_passenger/wsgi/application_spawner_rb.html +120 -0
- data/doc/rdoc/files/lib/rake/extensions_rb.html +3 -4
- data/doc/rdoc/fr_class_index.html +37 -19
- data/doc/rdoc/fr_file_index.html +25 -14
- data/doc/rdoc/fr_method_index.html +145 -74
- data/ext/apache2/Application.h +145 -44
- data/ext/apache2/ApplicationPool.h +27 -29
- data/ext/apache2/ApplicationPoolServer.h +183 -72
- data/ext/apache2/ApplicationPoolServerExecutable.cpp +249 -42
- data/ext/apache2/Bucket.cpp +61 -9
- data/ext/apache2/Bucket.h +15 -8
- data/ext/apache2/CachedFileStat.cpp +114 -0
- data/ext/apache2/CachedFileStat.h +169 -0
- data/ext/apache2/Configuration.cpp +213 -22
- data/ext/apache2/Configuration.h +176 -13
- data/ext/apache2/DirectoryMapper.h +287 -0
- data/ext/apache2/Exceptions.h +30 -12
- data/ext/apache2/FileChecker.h +108 -0
- data/ext/apache2/Hooks.cpp +709 -493
- data/ext/apache2/LICENSE-CNRI.TXT +15 -0
- data/ext/apache2/Logging.h +26 -22
- data/ext/apache2/MessageChannel.h +124 -15
- data/ext/apache2/PoolOptions.h +283 -0
- data/ext/apache2/SpawnManager.h +75 -99
- data/ext/apache2/StandardApplicationPool.h +296 -195
- data/ext/apache2/SystemTime.cpp +28 -0
- data/ext/apache2/SystemTime.h +82 -0
- data/ext/apache2/Utils.cpp +172 -18
- data/ext/apache2/Utils.h +124 -19
- data/ext/boost/cstdint.hpp +4 -2
- data/ext/boost/current_function.hpp +67 -0
- data/ext/boost/detail/sp_counted_base.hpp +4 -4
- data/ext/boost/thread/exceptions.hpp +2 -1
- data/ext/boost/thread/pthread/thread.hpp +11 -3
- data/ext/boost/thread/pthread/thread_data.hpp +2 -1
- data/ext/oxt/backtrace.cpp +172 -0
- data/ext/oxt/backtrace.hpp +135 -0
- data/ext/oxt/detail/backtrace_disabled.hpp +39 -0
- data/ext/oxt/detail/backtrace_enabled.hpp +155 -0
- data/ext/oxt/detail/spin_lock_gcc_x86.hpp +82 -0
- data/ext/oxt/detail/spin_lock_portable.hpp +38 -0
- data/ext/oxt/detail/spin_lock_pthreads.hpp +97 -0
- data/ext/oxt/detail/tracable_exception_disabled.hpp +46 -0
- data/ext/oxt/detail/tracable_exception_enabled.hpp +48 -0
- data/ext/oxt/macros.hpp +58 -0
- data/ext/oxt/spin_lock.hpp +55 -0
- data/ext/{apache2/System.cpp → oxt/system_calls.cpp} +87 -52
- data/ext/oxt/system_calls.hpp +234 -0
- data/ext/oxt/thread.cpp +32 -0
- data/ext/oxt/thread.hpp +223 -0
- data/ext/oxt/tracable_exception.cpp +87 -0
- data/ext/oxt/tracable_exception.hpp +35 -0
- data/{lib/passenger/constants.rb → ext/phusion_passenger/extconf.rb} +14 -9
- data/ext/{passenger → phusion_passenger}/native_support.c +33 -6
- data/lib/{passenger → phusion_passenger}/abstract_request_handler.rb +209 -93
- data/lib/{passenger → phusion_passenger}/abstract_server.rb +23 -8
- data/lib/phusion_passenger/abstract_server_collection.rb +301 -0
- data/lib/phusion_passenger/admin_tools.rb +25 -0
- data/lib/phusion_passenger/admin_tools/control_process.rb +107 -0
- data/lib/{passenger → phusion_passenger}/application.rb +13 -16
- data/lib/{passenger → phusion_passenger}/console_text_template.rb +2 -2
- data/{ext/passenger/extconf.rb → lib/phusion_passenger/constants.rb} +5 -5
- data/lib/{passenger → phusion_passenger}/dependencies.rb +38 -32
- data/lib/phusion_passenger/events.rb +45 -0
- data/lib/{passenger → phusion_passenger}/exceptions.rb +12 -5
- data/lib/{passenger → phusion_passenger}/html_template.rb +2 -2
- data/lib/{passenger → phusion_passenger}/message_channel.rb +3 -2
- data/lib/phusion_passenger/platform_info.rb +500 -0
- data/lib/{passenger → phusion_passenger}/rack/application_spawner.rb +29 -22
- data/lib/{passenger → phusion_passenger}/rack/request_handler.rb +14 -9
- data/lib/{passenger → phusion_passenger}/railz/application_spawner.rb +94 -74
- data/lib/{passenger → phusion_passenger}/railz/cgi_fixed.rb +2 -2
- data/lib/{passenger → phusion_passenger}/railz/framework_spawner.rb +86 -98
- data/lib/{passenger → phusion_passenger}/railz/request_handler.rb +6 -6
- data/lib/{passenger → phusion_passenger}/simple_benchmarking.rb +0 -0
- data/lib/{passenger → phusion_passenger}/spawn_manager.rb +136 -128
- data/lib/{passenger → phusion_passenger}/templates/apache2_config_snippets.txt.erb +0 -0
- data/lib/{passenger → phusion_passenger}/templates/apache_must_be_compiled_with_compatible_mpm.txt.erb +0 -0
- data/lib/phusion_passenger/templates/app_exited_during_initialization.html.erb +38 -0
- data/lib/{passenger → phusion_passenger}/templates/app_init_error.html.erb +0 -0
- data/lib/{passenger → phusion_passenger}/templates/database_error.html.erb +0 -0
- data/lib/{passenger → phusion_passenger}/templates/deployment_example.txt.erb +1 -1
- data/lib/{passenger → phusion_passenger}/templates/error_layout.css +0 -0
- data/lib/{passenger → phusion_passenger}/templates/error_layout.html.erb +0 -0
- data/lib/{passenger → phusion_passenger}/templates/framework_init_error.html.erb +0 -0
- data/lib/{passenger → phusion_passenger}/templates/general_error.html.erb +0 -0
- data/lib/{passenger → phusion_passenger}/templates/invalid_app_root.html.erb +1 -1
- data/lib/{passenger → phusion_passenger}/templates/load_error.html.erb +0 -0
- data/lib/{passenger → phusion_passenger}/templates/no_write_permission_to_passenger_root.txt.erb +0 -0
- data/lib/{passenger → phusion_passenger}/templates/possible_solutions_for_compilation_and_installation_problems.txt.erb +0 -0
- data/lib/{passenger → phusion_passenger}/templates/run_installer_as_root.txt.erb +0 -0
- data/lib/{passenger → phusion_passenger}/templates/version_not_found.html.erb +0 -0
- data/lib/{passenger → phusion_passenger}/templates/welcome.txt.erb +0 -0
- data/lib/{passenger → phusion_passenger}/utils.rb +210 -44
- data/lib/{passenger → phusion_passenger}/wsgi/application_spawner.rb +18 -15
- data/lib/{passenger → phusion_passenger}/wsgi/request_handler.py +7 -1
- data/man/passenger-memory-stats.8 +1 -1
- data/misc/render_error_pages.rb +1 -1
- data/test/ApplicationPoolServerTest.cpp +0 -28
- data/test/ApplicationPoolServer_ApplicationPoolTest.cpp +4 -0
- data/test/ApplicationPoolTest.cpp +307 -69
- data/test/CachedFileStatTest.cpp +262 -0
- data/test/FileCheckerTest.cpp +79 -0
- data/test/MessageChannelTest.cpp +3 -3
- data/test/PoolOptionsTest.cpp +37 -0
- data/test/SpawnManagerTest.cpp +4 -4
- data/test/StandardApplicationPoolTest.cpp +4 -0
- data/test/SystemTimeTest.cpp +37 -0
- data/test/UtilsTest.cpp +137 -0
- data/test/integration_tests.rb +270 -23
- data/test/oxt/backtrace_test.cpp +128 -0
- data/test/oxt/oxt_test_main.cpp +25 -0
- data/test/oxt/syscall_interruption_test.cpp +50 -0
- data/test/ruby/abstract_request_handler_spec.rb +83 -0
- data/test/ruby/abstract_server_collection_spec.rb +246 -0
- data/test/ruby/application_spec.rb +3 -3
- data/test/ruby/message_channel_spec.rb +2 -2
- data/test/ruby/rack/application_spawner_spec.rb +3 -5
- data/test/ruby/rails/application_spawner_spec.rb +54 -15
- data/test/ruby/rails/framework_spawner_spec.rb +6 -8
- data/test/ruby/rails/minimal_spawner_spec.rb +29 -0
- data/test/ruby/rails/spawner_error_handling_spec.rb +1 -1
- data/test/ruby/rails/spawner_privilege_lowering_spec.rb +3 -3
- data/test/ruby/spawn_manager_spec.rb +23 -12
- data/test/ruby/utils_spec.rb +36 -2
- data/test/ruby/wsgi/application_spawner_spec.rb +47 -0
- data/test/stub/apache2/httpd.conf.erb +3 -5
- data/test/stub/message_channel.rb +2 -2
- data/test/stub/message_channel_2.rb +2 -2
- data/test/stub/message_channel_3.rb +3 -3
- data/test/stub/minimal-railsapp/README +0 -0
- data/test/stub/minimal-railsapp/config/application.rb +0 -0
- data/test/stub/minimal-railsapp/config/environment.rb +0 -0
- data/test/stub/minimal-railsapp/vendor/rails/actionmailer/lib/action_mailer.rb +0 -0
- data/test/stub/minimal-railsapp/vendor/rails/actionpack/lib/action_controller.rb +0 -0
- data/test/stub/minimal-railsapp/vendor/rails/actionpack/lib/action_pack.rb +0 -0
- data/test/stub/minimal-railsapp/vendor/rails/actionpack/lib/action_view.rb +0 -0
- data/test/stub/minimal-railsapp/vendor/rails/activerecord/lib/active_record.rb +0 -0
- data/test/stub/minimal-railsapp/vendor/rails/activeresource/lib/active_resource.rb +0 -0
- data/test/stub/minimal-railsapp/vendor/rails/activesupport/lib/active_support.rb +0 -0
- data/test/stub/minimal-railsapp/vendor/rails/activesupport/lib/active_support/whiny_nil.rb +0 -0
- data/test/stub/minimal-railsapp/vendor/rails/railties/lib/dispatcher.rb +0 -0
- data/test/stub/minimal-railsapp/vendor/rails/railties/lib/initializer.rb +0 -0
- data/test/stub/minimal-railsapp/vendor/rails/railties/lib/ruby_version_check.rb +0 -0
- data/test/stub/rails_apps/foobar/app/controllers/foo_controller.rb +8 -0
- data/test/stub/rails_apps/foobar/config/environments/development.rb +1 -2
- data/test/stub/rails_apps/mycook/app/controllers/welcome_controller.rb +21 -1
- data/test/stub/rails_apps/mycook/sites/some.site/public/uploads.html +26 -0
- data/test/stub/rails_apps/mycook/sites/some.site/public/welcome/cached.html +26 -0
- data/test/stub/railsapp/app/controllers/application.rb +0 -0
- data/test/stub/railsapp/app/controllers/bar_controller_1.rb +0 -0
- data/test/stub/railsapp/app/controllers/bar_controller_2.rb +1 -1
- data/test/stub/railsapp/app/controllers/foo_controller.rb +4 -0
- data/test/stub/railsapp/app/helpers/application_helper.rb +0 -0
- data/test/stub/railsapp/config/boot.rb +0 -0
- data/test/stub/railsapp/config/database.yml +0 -0
- data/test/stub/railsapp/config/environment.rb +0 -0
- data/test/stub/railsapp/config/environments/development.rb +0 -0
- data/test/stub/railsapp/config/environments/production.rb +0 -0
- data/test/stub/railsapp/config/initializers/inflections.rb +0 -0
- data/test/stub/railsapp/config/initializers/mime_types.rb +0 -0
- data/test/stub/railsapp/config/routes.rb +0 -0
- data/test/stub/railsapp/public/useless.txt +0 -0
- data/test/stub/spawn_server.rb +3 -4
- data/test/stub/wsgi/passenger_wsgi.pyc +0 -0
- data/test/support/apache2_controller.rb +57 -7
- data/test/support/tut.h +15 -0
- data/vendor/README +12 -0
- data/vendor/README_FOR_PACKAGERS +1 -0
- data/vendor/rack-0.9.1/AUTHORS +8 -0
- data/vendor/rack-0.9.1/COPYING +18 -0
- data/vendor/rack-0.9.1/ChangeLog +1423 -0
- data/vendor/rack-0.9.1/KNOWN-ISSUES +18 -0
- data/vendor/rack-0.9.1/README +306 -0
- data/vendor/rack-0.9.1/Rakefile +188 -0
- data/vendor/rack-0.9.1/SPEC +129 -0
- data/vendor/rack-0.9.1/lib/rack.rb +86 -0
- data/vendor/rack-0.9.1/lib/rack/adapter/camping.rb +22 -0
- data/vendor/rack-0.9.1/lib/rack/auth/abstract/handler.rb +28 -0
- data/vendor/rack-0.9.1/lib/rack/auth/abstract/request.rb +37 -0
- data/vendor/rack-0.9.1/lib/rack/auth/basic.rb +58 -0
- data/vendor/rack-0.9.1/lib/rack/auth/digest/md5.rb +124 -0
- data/vendor/rack-0.9.1/lib/rack/auth/digest/nonce.rb +51 -0
- data/vendor/rack-0.9.1/lib/rack/auth/digest/params.rb +55 -0
- data/vendor/rack-0.9.1/lib/rack/auth/digest/request.rb +40 -0
- data/vendor/rack-0.9.1/lib/rack/auth/openid.rb +438 -0
- data/vendor/rack-0.9.1/lib/rack/builder.rb +67 -0
- data/vendor/rack-0.9.1/lib/rack/cascade.rb +36 -0
- data/vendor/rack-0.9.1/lib/rack/commonlogger.rb +61 -0
- data/vendor/rack-0.9.1/lib/rack/conditionalget.rb +43 -0
- data/vendor/rack-0.9.1/lib/rack/content_length.rb +25 -0
- data/vendor/rack-0.9.1/lib/rack/deflater.rb +87 -0
- data/vendor/rack-0.9.1/lib/rack/directory.rb +150 -0
- data/vendor/rack-0.9.1/lib/rack/file.rb +85 -0
- data/vendor/rack-0.9.1/lib/rack/handler.rb +48 -0
- data/vendor/rack-0.9.1/lib/rack/handler/cgi.rb +57 -0
- data/vendor/rack-0.9.1/lib/rack/handler/evented_mongrel.rb +8 -0
- data/vendor/rack-0.9.1/lib/rack/handler/fastcgi.rb +86 -0
- data/vendor/rack-0.9.1/lib/rack/handler/lsws.rb +52 -0
- data/vendor/rack-0.9.1/lib/rack/handler/mongrel.rb +82 -0
- data/vendor/rack-0.9.1/lib/rack/handler/scgi.rb +57 -0
- data/vendor/rack-0.9.1/lib/rack/handler/swiftiplied_mongrel.rb +8 -0
- data/vendor/rack-0.9.1/lib/rack/handler/thin.rb +15 -0
- data/vendor/rack-0.9.1/lib/rack/handler/webrick.rb +61 -0
- data/vendor/rack-0.9.1/lib/rack/head.rb +19 -0
- data/vendor/rack-0.9.1/lib/rack/lint.rb +465 -0
- data/vendor/rack-0.9.1/lib/rack/lobster.rb +65 -0
- data/vendor/rack-0.9.1/lib/rack/methodoverride.rb +27 -0
- data/vendor/rack-0.9.1/lib/rack/mime.rb +204 -0
- data/vendor/rack-0.9.1/lib/rack/mock.rb +160 -0
- data/vendor/rack-0.9.1/lib/rack/recursive.rb +57 -0
- data/vendor/rack-0.9.1/lib/rack/reloader.rb +64 -0
- data/vendor/rack-0.9.1/lib/rack/request.rb +218 -0
- data/vendor/rack-0.9.1/lib/rack/response.rb +171 -0
- data/vendor/rack-0.9.1/lib/rack/session/abstract/id.rb +153 -0
- data/vendor/rack-0.9.1/lib/rack/session/cookie.rb +89 -0
- data/vendor/rack-0.9.1/lib/rack/session/memcache.rb +97 -0
- data/vendor/rack-0.9.1/lib/rack/session/pool.rb +73 -0
- data/vendor/rack-0.9.1/lib/rack/showexceptions.rb +348 -0
- data/vendor/rack-0.9.1/lib/rack/showstatus.rb +106 -0
- data/vendor/rack-0.9.1/lib/rack/static.rb +38 -0
- data/vendor/rack-0.9.1/lib/rack/urlmap.rb +48 -0
- data/vendor/rack-0.9.1/lib/rack/utils.rb +347 -0
- metadata +1197 -1055
- data/doc/cxxapi/System_8h-source.html +0 -251
- data/doc/cxxapi/classDirectoryMapper-members.html +0 -38
- data/doc/cxxapi/classDirectoryMapper.html +0 -203
- data/doc/cxxapi/classPassenger_1_1Thread.html +0 -100
- data/doc/cxxapi/classboost_1_1this__thread_1_1disable__syscall__interruption.html +0 -46
- data/doc/cxxapi/classboost_1_1this__thread_1_1restore__syscall__interruption-members.html +0 -33
- data/doc/cxxapi/classboost_1_1this__thread_1_1restore__syscall__interruption.html +0 -44
- data/doc/cxxapi/namespacePassenger.html +0 -208
- data/doc/cxxapi/namespacePassenger_1_1InterruptableCalls.html +0 -43
- data/doc/cxxapi/namespacemembers.html +0 -70
- data/doc/cxxapi/namespacemembers_func.html +0 -66
- data/doc/cxxapi/namespacemembers_type.html +0 -46
- data/doc/cxxapi/namespaces.html +0 -35
- data/doc/rdoc/classes/Passenger.html +0 -136
- data/doc/rdoc/classes/Passenger/AbstractRequestHandler.html +0 -402
- data/doc/rdoc/classes/Passenger/SpawnManager.html +0 -379
- data/doc/rdoc/classes/Passenger/Utils.html +0 -578
- data/ext/apache2/System.h +0 -228
- data/lib/passenger/platform_info.rb +0 -302
- data/lib/passenger/templates/app_exited_during_initialization.html.erb +0 -19
- data/test/stub/apache2/httpd.conf +0 -75
- data/test/stub/rails_apps/foobar/config/environments/test.rb +0 -22
- data/test/stub/rails_apps/mycook/config/environments/test.rb +0 -22
- data/test/stub/railsapp/config/environments/test.rb +0 -22
- data/test/stub/railsapp2/config/environments/test.rb +0 -22
@@ -4,7 +4,7 @@
|
|
4
4
|
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
5
|
<html>
|
6
6
|
<head>
|
7
|
-
<title>Class:
|
7
|
+
<title>Class: PhusionPassenger::VersionNotFound</title>
|
8
8
|
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
9
9
|
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
10
10
|
|
@@ -51,13 +51,13 @@
|
|
51
51
|
|
52
52
|
<body>
|
53
53
|
<table width="100%" border='0' cellpadding='0' cellspacing='0' class='banner'><tr>
|
54
|
-
<td class="file-title"><span class="file-title-prefix">Class</span><br />
|
54
|
+
<td class="file-title"><span class="file-title-prefix">Class</span><br />PhusionPassenger::VersionNotFound</td>
|
55
55
|
<td align="right">
|
56
56
|
<table cellspacing="0" cellpadding="2">
|
57
57
|
<tr valign="top">
|
58
58
|
<td>In:</td>
|
59
59
|
<td>
|
60
|
-
<a href="../../files/lib/
|
60
|
+
<a href="../../files/lib/phusion_passenger/exceptions_rb.html">lib/phusion_passenger/exceptions.rb</a>
|
61
61
|
</td>
|
62
62
|
</tr>
|
63
63
|
<tr>
|
@@ -85,7 +85,7 @@ given Ruby on Rails Gem version specification.
|
|
85
85
|
|
86
86
|
<div class="sectiontitle">Methods</div>
|
87
87
|
<ul>
|
88
|
-
<li><a href="#
|
88
|
+
<li><a href="#M000088">new</a></li>
|
89
89
|
</ul>
|
90
90
|
|
91
91
|
|
@@ -106,7 +106,7 @@ given Ruby on Rails Gem version specification.
|
|
106
106
|
<div class="sectiontitle">Public Class methods</div>
|
107
107
|
<div class="method">
|
108
108
|
<div class="title">
|
109
|
-
<a name="
|
109
|
+
<a name="M000088"></a><b>new</b>(message, gem_version_spec)
|
110
110
|
</div>
|
111
111
|
<div class="description">
|
112
112
|
<ul>
|
@@ -120,10 +120,10 @@ caused this error.
|
|
120
120
|
</ul>
|
121
121
|
</div>
|
122
122
|
<div class="sourcecode">
|
123
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
124
|
-
<div id="
|
123
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000088_source')" id="l_M000088_source">show source</a> ]</p>
|
124
|
+
<div id="M000088_source" class="dyn-source">
|
125
125
|
<pre>
|
126
|
-
<span class="ruby-comment cmt"># File lib/
|
126
|
+
<span class="ruby-comment cmt"># File lib/phusion_passenger/exceptions.rb, line 28</span>
|
127
127
|
28: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">message</span>, <span class="ruby-identifier">gem_version_spec</span>)
|
128
128
|
29: <span class="ruby-keyword kw">super</span>(<span class="ruby-identifier">message</span>)
|
129
129
|
30: <span class="ruby-ivar">@gem_version_spec</span> = <span class="ruby-identifier">gem_version_spec</span>
|
@@ -0,0 +1,89 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
<html>
|
6
|
+
<head>
|
7
|
+
<title>Module: PhusionPassenger::WSGI</title>
|
8
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
9
|
+
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
10
|
+
|
11
|
+
<script language="JavaScript" type="text/javascript">
|
12
|
+
// <![CDATA[
|
13
|
+
|
14
|
+
function toggleSource( id )
|
15
|
+
{
|
16
|
+
var elem
|
17
|
+
var link
|
18
|
+
|
19
|
+
if( document.getElementById )
|
20
|
+
{
|
21
|
+
elem = document.getElementById( id )
|
22
|
+
link = document.getElementById( "l_" + id )
|
23
|
+
}
|
24
|
+
else if ( document.all )
|
25
|
+
{
|
26
|
+
elem = eval( "document.all." + id )
|
27
|
+
link = eval( "document.all.l_" + id )
|
28
|
+
}
|
29
|
+
else
|
30
|
+
return false;
|
31
|
+
|
32
|
+
if( elem.style.display == "block" )
|
33
|
+
{
|
34
|
+
elem.style.display = "none"
|
35
|
+
link.innerHTML = "show source"
|
36
|
+
}
|
37
|
+
else
|
38
|
+
{
|
39
|
+
elem.style.display = "block"
|
40
|
+
link.innerHTML = "hide source"
|
41
|
+
}
|
42
|
+
}
|
43
|
+
|
44
|
+
function openCode( url )
|
45
|
+
{
|
46
|
+
window.open( url, "SOURCE_CODE", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=480,width=750" ).focus();
|
47
|
+
}
|
48
|
+
// ]]>
|
49
|
+
</script>
|
50
|
+
</head>
|
51
|
+
|
52
|
+
<body>
|
53
|
+
<table width="100%" border='0' cellpadding='0' cellspacing='0' class='banner'><tr>
|
54
|
+
<td class="file-title"><span class="file-title-prefix">Module</span><br />PhusionPassenger::WSGI</td>
|
55
|
+
<td align="right">
|
56
|
+
<table cellspacing="0" cellpadding="2">
|
57
|
+
<tr valign="top">
|
58
|
+
<td>In:</td>
|
59
|
+
<td>
|
60
|
+
<a href="../../files/lib/phusion_passenger/wsgi/application_spawner_rb.html">lib/phusion_passenger/wsgi/application_spawner.rb</a>
|
61
|
+
</td>
|
62
|
+
</tr>
|
63
|
+
</table>
|
64
|
+
</td>
|
65
|
+
</tr>
|
66
|
+
</table>
|
67
|
+
<!-- banner header -->
|
68
|
+
|
69
|
+
<div id="bodyContent">
|
70
|
+
<div id="content">
|
71
|
+
|
72
|
+
|
73
|
+
|
74
|
+
|
75
|
+
|
76
|
+
|
77
|
+
|
78
|
+
<div class="sectiontitle">Classes and Modules</div>
|
79
|
+
Class <a href="WSGI/ApplicationSpawner.html" class="link">PhusionPassenger::WSGI::ApplicationSpawner</a><br />
|
80
|
+
|
81
|
+
|
82
|
+
|
83
|
+
|
84
|
+
</div>
|
85
|
+
|
86
|
+
</div>
|
87
|
+
|
88
|
+
</body>
|
89
|
+
</html>
|
@@ -0,0 +1,188 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
<html>
|
6
|
+
<head>
|
7
|
+
<title>Class: PhusionPassenger::WSGI::ApplicationSpawner</title>
|
8
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
9
|
+
<link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
|
10
|
+
|
11
|
+
<script language="JavaScript" type="text/javascript">
|
12
|
+
// <![CDATA[
|
13
|
+
|
14
|
+
function toggleSource( id )
|
15
|
+
{
|
16
|
+
var elem
|
17
|
+
var link
|
18
|
+
|
19
|
+
if( document.getElementById )
|
20
|
+
{
|
21
|
+
elem = document.getElementById( id )
|
22
|
+
link = document.getElementById( "l_" + id )
|
23
|
+
}
|
24
|
+
else if ( document.all )
|
25
|
+
{
|
26
|
+
elem = eval( "document.all." + id )
|
27
|
+
link = eval( "document.all.l_" + id )
|
28
|
+
}
|
29
|
+
else
|
30
|
+
return false;
|
31
|
+
|
32
|
+
if( elem.style.display == "block" )
|
33
|
+
{
|
34
|
+
elem.style.display = "none"
|
35
|
+
link.innerHTML = "show source"
|
36
|
+
}
|
37
|
+
else
|
38
|
+
{
|
39
|
+
elem.style.display = "block"
|
40
|
+
link.innerHTML = "hide source"
|
41
|
+
}
|
42
|
+
}
|
43
|
+
|
44
|
+
function openCode( url )
|
45
|
+
{
|
46
|
+
window.open( url, "SOURCE_CODE", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=480,width=750" ).focus();
|
47
|
+
}
|
48
|
+
// ]]>
|
49
|
+
</script>
|
50
|
+
</head>
|
51
|
+
|
52
|
+
<body>
|
53
|
+
<table width="100%" border='0' cellpadding='0' cellspacing='0' class='banner'><tr>
|
54
|
+
<td class="file-title"><span class="file-title-prefix">Class</span><br />PhusionPassenger::WSGI::ApplicationSpawner</td>
|
55
|
+
<td align="right">
|
56
|
+
<table cellspacing="0" cellpadding="2">
|
57
|
+
<tr valign="top">
|
58
|
+
<td>In:</td>
|
59
|
+
<td>
|
60
|
+
<a href="../../../files/lib/phusion_passenger/wsgi/application_spawner_rb.html">lib/phusion_passenger/wsgi/application_spawner.rb</a>
|
61
|
+
</td>
|
62
|
+
</tr>
|
63
|
+
<tr>
|
64
|
+
<td>Parent:</td>
|
65
|
+
<td>
|
66
|
+
Object
|
67
|
+
</td>
|
68
|
+
</tr>
|
69
|
+
</table>
|
70
|
+
</td>
|
71
|
+
</tr>
|
72
|
+
</table>
|
73
|
+
<!-- banner header -->
|
74
|
+
|
75
|
+
<div id="bodyContent">
|
76
|
+
<div id="content">
|
77
|
+
|
78
|
+
<div class="description"><p>
|
79
|
+
Class for spawning <a href="../WSGI.html">WSGI</a> applications.
|
80
|
+
</p>
|
81
|
+
</div>
|
82
|
+
|
83
|
+
|
84
|
+
|
85
|
+
<div class="sectiontitle">Methods</div>
|
86
|
+
<ul>
|
87
|
+
<li><a href="#M000055">spawn_application</a></li>
|
88
|
+
<li><a href="#M000056">spawn_application</a></li>
|
89
|
+
</ul>
|
90
|
+
|
91
|
+
<div class="sectiontitle">Included Modules</div>
|
92
|
+
<ul>
|
93
|
+
<li><a href="../Utils.html">Utils</a></li>
|
94
|
+
</ul>
|
95
|
+
|
96
|
+
|
97
|
+
|
98
|
+
<div class="sectiontitle">Constants</div>
|
99
|
+
<table border='0' cellpadding='5'>
|
100
|
+
<tr valign='top'>
|
101
|
+
<td class="attr-name">REQUEST_HANDLER</td>
|
102
|
+
<td>=</td>
|
103
|
+
<td class="attr-value">File.expand_path(File.dirname(__FILE__) + "/request_handler.py")</td>
|
104
|
+
</tr>
|
105
|
+
</table>
|
106
|
+
|
107
|
+
|
108
|
+
<div class="sectiontitle">Public Class methods</div>
|
109
|
+
<div class="method">
|
110
|
+
<div class="title">
|
111
|
+
<a name="M000055"></a><b>spawn_application</b>(*args)
|
112
|
+
</div>
|
113
|
+
<div class="sourcecode">
|
114
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000055_source')" id="l_M000055_source">show source</a> ]</p>
|
115
|
+
<div id="M000055_source" class="dyn-source">
|
116
|
+
<pre>
|
117
|
+
<span class="ruby-comment cmt"># File lib/phusion_passenger/wsgi/application_spawner.rb, line 29</span>
|
118
|
+
29: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">spawn_application</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
|
119
|
+
30: <span class="ruby-ivar">@@instance</span> <span class="ruby-operator">||=</span> <span class="ruby-constant">ApplicationSpawner</span>.<span class="ruby-identifier">new</span>
|
120
|
+
31: <span class="ruby-ivar">@@instance</span>.<span class="ruby-identifier">spawn_application</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
|
121
|
+
32: <span class="ruby-keyword kw">end</span>
|
122
|
+
</pre>
|
123
|
+
</div>
|
124
|
+
</div>
|
125
|
+
</div>
|
126
|
+
<div class="sectiontitle">Public Instance methods</div>
|
127
|
+
<div class="method">
|
128
|
+
<div class="title">
|
129
|
+
<a name="M000056"></a><b>spawn_application</b>(app_root, lower_privilege = true, lowest_user = "nobody", environment = "production")
|
130
|
+
</div>
|
131
|
+
<div class="description">
|
132
|
+
<p>
|
133
|
+
Spawn an instance of the given <a href="../WSGI.html">WSGI</a> application.
|
134
|
+
When successful, an <a href="../Application.html">Application</a> object
|
135
|
+
will be returned, which represents the spawned application.
|
136
|
+
</p>
|
137
|
+
<p>
|
138
|
+
Raises:
|
139
|
+
</p>
|
140
|
+
<ul>
|
141
|
+
<li><a href="../AppInitError.html">AppInitError</a>: The <a
|
142
|
+
href="../WSGI.html">WSGI</a> application raised an exception or called
|
143
|
+
exit() during startup.
|
144
|
+
|
145
|
+
</li>
|
146
|
+
<li>SystemCallError, IOError, SocketError: Something went wrong.
|
147
|
+
|
148
|
+
</li>
|
149
|
+
</ul>
|
150
|
+
</div>
|
151
|
+
<div class="sourcecode">
|
152
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000056_source')" id="l_M000056_source">show source</a> ]</p>
|
153
|
+
<div id="M000056_source" class="dyn-source">
|
154
|
+
<pre>
|
155
|
+
<span class="ruby-comment cmt"># File lib/phusion_passenger/wsgi/application_spawner.rb, line 42</span>
|
156
|
+
42: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">spawn_application</span>(<span class="ruby-identifier">app_root</span>, <span class="ruby-identifier">lower_privilege</span> = <span class="ruby-keyword kw">true</span>, <span class="ruby-identifier">lowest_user</span> = <span class="ruby-value str">"nobody"</span>, <span class="ruby-identifier">environment</span> = <span class="ruby-value str">"production"</span>)
|
157
|
+
43: <span class="ruby-identifier">a</span>, <span class="ruby-identifier">b</span> = <span class="ruby-constant">UNIXSocket</span>.<span class="ruby-identifier">pair</span>
|
158
|
+
44: <span class="ruby-identifier">pid</span> = <span class="ruby-identifier">safe_fork</span>(<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">to_s</span>, <span class="ruby-keyword kw">true</span>) <span class="ruby-keyword kw">do</span>
|
159
|
+
45: <span class="ruby-identifier">a</span>.<span class="ruby-identifier">close</span>
|
160
|
+
46:
|
161
|
+
47: <span class="ruby-identifier">file_descriptors_to_leave_open</span> = [<span class="ruby-value">0</span>, <span class="ruby-value">1</span>, <span class="ruby-value">2</span>, <span class="ruby-identifier">b</span>.<span class="ruby-identifier">fileno</span>]
|
162
|
+
48: <span class="ruby-constant">NativeSupport</span>.<span class="ruby-identifier">close_all_file_descriptors</span>(<span class="ruby-identifier">file_descriptors_to_leave_open</span>)
|
163
|
+
49: <span class="ruby-identifier">close_all_io_objects_for_fds</span>(<span class="ruby-identifier">file_descriptors_to_leave_open</span>)
|
164
|
+
50:
|
165
|
+
51: <span class="ruby-identifier">run</span>(<span class="ruby-constant">MessageChannel</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">b</span>), <span class="ruby-identifier">app_root</span>, <span class="ruby-identifier">lower_privilege</span>, <span class="ruby-identifier">lowest_user</span>, <span class="ruby-identifier">environment</span>)
|
166
|
+
52: <span class="ruby-keyword kw">end</span>
|
167
|
+
53: <span class="ruby-identifier">b</span>.<span class="ruby-identifier">close</span>
|
168
|
+
54: <span class="ruby-constant">Process</span>.<span class="ruby-identifier">waitpid</span>(<span class="ruby-identifier">pid</span>) <span class="ruby-keyword kw">rescue</span> <span class="ruby-keyword kw">nil</span>
|
169
|
+
55:
|
170
|
+
56: <span class="ruby-identifier">channel</span> = <span class="ruby-constant">MessageChannel</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">a</span>)
|
171
|
+
57: <span class="ruby-identifier">pid</span>, <span class="ruby-identifier">socket_name</span>, <span class="ruby-identifier">socket_type</span> = <span class="ruby-identifier">channel</span>.<span class="ruby-identifier">read</span>
|
172
|
+
58: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">pid</span>.<span class="ruby-identifier">nil?</span>
|
173
|
+
59: <span class="ruby-identifier">raise</span> <span class="ruby-constant">IOError</span>, <span class="ruby-value str">"Connection closed"</span>
|
174
|
+
60: <span class="ruby-keyword kw">end</span>
|
175
|
+
61: <span class="ruby-identifier">owner_pipe</span> = <span class="ruby-identifier">channel</span>.<span class="ruby-identifier">recv_io</span>
|
176
|
+
62: <span class="ruby-keyword kw">return</span> <span class="ruby-constant">Application</span>.<span class="ruby-identifier">new</span>(<span class="ruby-ivar">@app_root</span>, <span class="ruby-identifier">pid</span>, <span class="ruby-identifier">socket_name</span>,
|
177
|
+
63: <span class="ruby-identifier">socket_type</span>, <span class="ruby-identifier">owner_pipe</span>)
|
178
|
+
64: <span class="ruby-keyword kw">end</span>
|
179
|
+
</pre>
|
180
|
+
</div>
|
181
|
+
</div>
|
182
|
+
</div>
|
183
|
+
</div>
|
184
|
+
|
185
|
+
</div>
|
186
|
+
|
187
|
+
</body>
|
188
|
+
</html>
|
@@ -57,7 +57,7 @@
|
|
57
57
|
<tr valign="top">
|
58
58
|
<td>In:</td>
|
59
59
|
<td>
|
60
|
-
<a href="../files/lib/
|
60
|
+
<a href="../files/lib/phusion_passenger/platform_info_rb.html">lib/phusion_passenger/platform_info.rb</a>
|
61
61
|
</td>
|
62
62
|
</tr>
|
63
63
|
</table>
|
@@ -75,8 +75,9 @@ that information through constants.
|
|
75
75
|
</p>
|
76
76
|
<p>
|
77
77
|
Users can change the detection behavior by setting the environment variable
|
78
|
-
<tt>APXS2</tt> to the correct ‘apxs’ (or ‘
|
79
|
-
binary, as provided by
|
78
|
+
<tt>APXS2</tt> to the correct ‘apxs’ (or ‘<a
|
79
|
+
href="PlatformInfo.html#M000014">apxs2</a>’) binary, as provided by
|
80
|
+
Apache.
|
80
81
|
</p>
|
81
82
|
</div>
|
82
83
|
|
@@ -84,7 +85,28 @@ binary, as provided by Apache.
|
|
84
85
|
|
85
86
|
<div class="sectiontitle">Methods</div>
|
86
87
|
<ul>
|
87
|
-
<li><a href="#
|
88
|
+
<li><a href="#M000019">apache2_bindir</a></li>
|
89
|
+
<li><a href="#M000024">apache2_module_cflags</a></li>
|
90
|
+
<li><a href="#M000025">apache2_module_ldflags</a></li>
|
91
|
+
<li><a href="#M000020">apache2_sbindir</a></li>
|
92
|
+
<li><a href="#M000015">apache2ctl</a></li>
|
93
|
+
<li><a href="#M000017">apr_config</a></li>
|
94
|
+
<li><a href="#M000030">apr_config_needed_for_building_apache_modules?</a></li>
|
95
|
+
<li><a href="#M000026">apr_flags</a></li>
|
96
|
+
<li><a href="#M000027">apr_libs</a></li>
|
97
|
+
<li><a href="#M000018">apu_config</a></li>
|
98
|
+
<li><a href="#M000028">apu_flags</a></li>
|
99
|
+
<li><a href="#M000029">apu_libs</a></li>
|
100
|
+
<li><a href="#M000014">apxs2</a></li>
|
101
|
+
<li><a href="#M000023">debugging_cflags</a></li>
|
102
|
+
<li><a href="#M000011">find_command</a></li>
|
103
|
+
<li><a href="#M000016">httpd</a></li>
|
104
|
+
<li><a href="#M000031">library_extension</a></li>
|
105
|
+
<li><a href="#M000032">linux_distro</a></li>
|
106
|
+
<li><a href="#M000021">portability_cflags</a></li>
|
107
|
+
<li><a href="#M000022">portability_ldflags</a></li>
|
108
|
+
<li><a href="#M000012">rake</a></li>
|
109
|
+
<li><a href="#M000013">rspec</a></li>
|
88
110
|
</ul>
|
89
111
|
|
90
112
|
|
@@ -107,7 +129,7 @@ The absolute path to the current Ruby interpreter.
|
|
107
129
|
<tr valign='top'>
|
108
130
|
<td class="attr-name">GEM</td>
|
109
131
|
<td>=</td>
|
110
|
-
<td class="attr-value">
|
132
|
+
<td class="attr-value">locate_ruby_executable('gem')</td>
|
111
133
|
</tr>
|
112
134
|
<tr valign='top'>
|
113
135
|
<td> </td>
|
@@ -116,155 +138,424 @@ The correct ‘gem’ command for this Ruby interpreter.
|
|
116
138
|
|
117
139
|
</td>
|
118
140
|
</tr>
|
119
|
-
|
120
|
-
<td class="attr-name">APXS2</td>
|
121
|
-
<td>=</td>
|
122
|
-
<td class="attr-value">find_apxs2</td>
|
123
|
-
</tr>
|
124
|
-
<tr valign='top'>
|
125
|
-
<td> </td>
|
126
|
-
<td colspan="2" class="attr-desc">
|
127
|
-
The absolute path to the ‘apxs’ or ‘apxs2’
|
128
|
-
executable.
|
141
|
+
</table>
|
129
142
|
|
130
|
-
</td>
|
131
|
-
</tr>
|
132
|
-
<tr valign='top'>
|
133
|
-
<td class="attr-name">APACHE2_BINDIR</td>
|
134
|
-
<td>=</td>
|
135
|
-
<td class="attr-value">determine_apache2_bindir</td>
|
136
|
-
</tr>
|
137
|
-
<tr valign='top'>
|
138
|
-
<td> </td>
|
139
|
-
<td colspan="2" class="attr-desc">
|
140
|
-
The absolute path to the Apache 2 ‘bin’ directory.
|
141
143
|
|
142
|
-
</
|
143
|
-
|
144
|
-
<
|
145
|
-
<
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
144
|
+
<div class="sectiontitle">Public Class methods</div>
|
145
|
+
<div class="method">
|
146
|
+
<div class="title">
|
147
|
+
<a name="M000019"></a><b>apache2_bindir</b>()
|
148
|
+
</div>
|
149
|
+
<div class="description">
|
150
|
+
<p>
|
151
|
+
The absolute path to the Apache 2 ‘bin’ directory.
|
152
|
+
</p>
|
153
|
+
</div>
|
154
|
+
<div class="sourcecode">
|
155
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000019_source')" id="l_M000019_source">show source</a> ]</p>
|
156
|
+
<div id="M000019_source" class="dyn-source">
|
157
|
+
<pre>
|
158
|
+
<span class="ruby-comment cmt"># File lib/phusion_passenger/platform_info.rb, line 305</span>
|
159
|
+
305: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">apache2_bindir</span>
|
160
|
+
306: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">apxs2</span>.<span class="ruby-identifier">nil?</span>
|
161
|
+
307: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">nil</span>
|
162
|
+
308: <span class="ruby-keyword kw">else</span>
|
163
|
+
309: <span class="ruby-keyword kw">return</span> <span class="ruby-node">`#{apxs2} -q BINDIR 2>/dev/null`</span>.<span class="ruby-identifier">strip</span>
|
164
|
+
310: <span class="ruby-keyword kw">end</span>
|
165
|
+
311: <span class="ruby-keyword kw">end</span>
|
166
|
+
</pre>
|
167
|
+
</div>
|
168
|
+
</div>
|
169
|
+
</div>
|
170
|
+
<div class="method">
|
171
|
+
<div class="title">
|
172
|
+
<a name="M000024"></a><b>apache2_module_cflags</b>(with_apr_flags = true)
|
173
|
+
</div>
|
174
|
+
<div class="description">
|
175
|
+
<p>
|
176
|
+
The C compiler flags that are necessary to compile an Apache module.
|
177
|
+
Includes <a href="PlatformInfo.html#M000021">portability_cflags</a>.
|
178
|
+
</p>
|
179
|
+
</div>
|
180
|
+
<div class="sourcecode">
|
181
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000024_source')" id="l_M000024_source">show source</a> ]</p>
|
182
|
+
<div id="M000024_source" class="dyn-source">
|
183
|
+
<pre>
|
184
|
+
<span class="ruby-comment cmt"># File lib/phusion_passenger/platform_info.rb, line 372</span>
|
185
|
+
372: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">apache2_module_cflags</span>(<span class="ruby-identifier">with_apr_flags</span> = <span class="ruby-keyword kw">true</span>)
|
186
|
+
373: <span class="ruby-identifier">flags</span> = [<span class="ruby-value str">"-fPIC"</span>]
|
187
|
+
374: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">with_apr_flags</span>
|
188
|
+
375: <span class="ruby-identifier">flags</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">apr_flags</span>
|
189
|
+
376: <span class="ruby-identifier">flags</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">apu_flags</span>
|
190
|
+
377: <span class="ruby-keyword kw">end</span>
|
191
|
+
378: <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">apxs2</span>.<span class="ruby-identifier">nil?</span>
|
192
|
+
379: <span class="ruby-identifier">apxs2_flags</span> = <span class="ruby-node">`#{apxs2} -q CFLAGS`</span>.<span class="ruby-identifier">strip</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">" -I"</span> <span class="ruby-operator"><<</span> <span class="ruby-node">`#{apxs2} -q INCLUDEDIR`</span>.<span class="ruby-identifier">strip</span>
|
193
|
+
380: <span class="ruby-identifier">apxs2_flags</span>.<span class="ruby-identifier">gsub!</span>(<span class="ruby-regexp re">/-O\d? /</span>, <span class="ruby-value str">''</span>)
|
194
|
+
381:
|
195
|
+
382: <span class="ruby-comment cmt"># Remove flags not supported by GCC</span>
|
196
|
+
383: <span class="ruby-keyword kw">if</span> <span class="ruby-constant">RUBY_PLATFORM</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/solaris/</span> <span class="ruby-comment cmt"># TODO: Add support for people using SunStudio</span>
|
197
|
+
384: <span class="ruby-comment cmt"># The big problem is Coolstack apxs includes a bunch of solaris -x directives.</span>
|
198
|
+
385: <span class="ruby-identifier">options</span> = <span class="ruby-identifier">apxs2_flags</span>.<span class="ruby-identifier">split</span>
|
199
|
+
386: <span class="ruby-identifier">options</span>.<span class="ruby-identifier">reject!</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">f</span><span class="ruby-operator">|</span> <span class="ruby-identifier">f</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/^\-x/</span> }
|
200
|
+
387: <span class="ruby-identifier">options</span>.<span class="ruby-identifier">reject!</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">f</span><span class="ruby-operator">|</span> <span class="ruby-identifier">f</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/^\-Xa/</span> }
|
201
|
+
388: <span class="ruby-identifier">apxs2_flags</span> = <span class="ruby-identifier">options</span>.<span class="ruby-identifier">join</span>(<span class="ruby-value str">' '</span>)
|
202
|
+
389: <span class="ruby-keyword kw">end</span>
|
203
|
+
390:
|
204
|
+
391: <span class="ruby-identifier">apxs2_flags</span>.<span class="ruby-identifier">strip!</span>
|
205
|
+
392: <span class="ruby-identifier">flags</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">apxs2_flags</span>
|
206
|
+
393: <span class="ruby-keyword kw">end</span>
|
207
|
+
394: <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">httpd</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-operator">&&</span> <span class="ruby-constant">RUBY_PLATFORM</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/darwin/</span>
|
208
|
+
395: <span class="ruby-comment cmt"># Add possible universal binary flags.</span>
|
209
|
+
396: <span class="ruby-identifier">architectures</span> = []
|
210
|
+
397: <span class="ruby-node">`file "#{httpd}"`</span>.<span class="ruby-identifier">split</span>(<span class="ruby-value str">"\n"</span>).<span class="ruby-identifier">grep</span>(<span class="ruby-regexp re">/for architecture/</span>).<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">line</span><span class="ruby-operator">|</span>
|
211
|
+
398: <span class="ruby-identifier">line</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/for architecture (.*?)\)/</span>
|
212
|
+
399: <span class="ruby-identifier">architectures</span> <span class="ruby-operator"><<</span> <span class="ruby-node">"-arch #{$1}"</span>
|
213
|
+
400: <span class="ruby-keyword kw">end</span>
|
214
|
+
401: <span class="ruby-identifier">flags</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">architectures</span>.<span class="ruby-identifier">join</span>(<span class="ruby-value str">' '</span>)
|
215
|
+
402: <span class="ruby-keyword kw">end</span>
|
216
|
+
403: <span class="ruby-identifier">flags</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">portability_cflags</span>
|
217
|
+
404: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">flags</span>.<span class="ruby-identifier">compact</span>.<span class="ruby-identifier">join</span>(<span class="ruby-value str">' '</span>).<span class="ruby-identifier">strip</span>
|
218
|
+
405: <span class="ruby-keyword kw">end</span>
|
219
|
+
</pre>
|
220
|
+
</div>
|
221
|
+
</div>
|
222
|
+
</div>
|
223
|
+
<div class="method">
|
224
|
+
<div class="title">
|
225
|
+
<a name="M000025"></a><b>apache2_module_ldflags</b>()
|
226
|
+
</div>
|
227
|
+
<div class="description">
|
228
|
+
<p>
|
229
|
+
Linker flags that are necessary for linking an Apache module. Includes <a
|
230
|
+
href="PlatformInfo.html#M000022">portability_ldflags</a>
|
231
|
+
</p>
|
232
|
+
</div>
|
233
|
+
<div class="sourcecode">
|
234
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000025_source')" id="l_M000025_source">show source</a> ]</p>
|
235
|
+
<div id="M000025_source" class="dyn-source">
|
236
|
+
<pre>
|
237
|
+
<span class="ruby-comment cmt"># File lib/phusion_passenger/platform_info.rb, line 410</span>
|
238
|
+
410: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">apache2_module_ldflags</span>
|
239
|
+
411: <span class="ruby-identifier">flags</span> = <span class="ruby-node">"-fPIC #{apr_libs} #{apu_libs} #{portability_ldflags}"</span>
|
240
|
+
412: <span class="ruby-identifier">flags</span>.<span class="ruby-identifier">strip!</span>
|
241
|
+
413: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">flags</span>
|
242
|
+
414: <span class="ruby-keyword kw">end</span>
|
243
|
+
</pre>
|
244
|
+
</div>
|
245
|
+
</div>
|
246
|
+
</div>
|
247
|
+
<div class="method">
|
248
|
+
<div class="title">
|
249
|
+
<a name="M000020"></a><b>apache2_sbindir</b>()
|
250
|
+
</div>
|
251
|
+
<div class="description">
|
252
|
+
<p>
|
152
253
|
The absolute path to the Apache 2 ‘sbin’ directory.
|
153
|
-
|
154
|
-
</
|
155
|
-
|
156
|
-
<
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
</
|
168
|
-
</
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
The absolute path to the
|
178
|
-
|
179
|
-
|
180
|
-
</
|
181
|
-
|
182
|
-
<
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
254
|
+
</p>
|
255
|
+
</div>
|
256
|
+
<div class="sourcecode">
|
257
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000020_source')" id="l_M000020_source">show source</a> ]</p>
|
258
|
+
<div id="M000020_source" class="dyn-source">
|
259
|
+
<pre>
|
260
|
+
<span class="ruby-comment cmt"># File lib/phusion_passenger/platform_info.rb, line 315</span>
|
261
|
+
315: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">apache2_sbindir</span>
|
262
|
+
316: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">apxs2</span>.<span class="ruby-identifier">nil?</span>
|
263
|
+
317: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">nil</span>
|
264
|
+
318: <span class="ruby-keyword kw">else</span>
|
265
|
+
319: <span class="ruby-keyword kw">return</span> <span class="ruby-node">`#{apxs2} -q SBINDIR`</span>.<span class="ruby-identifier">strip</span>
|
266
|
+
320: <span class="ruby-keyword kw">end</span>
|
267
|
+
321: <span class="ruby-keyword kw">end</span>
|
268
|
+
</pre>
|
269
|
+
</div>
|
270
|
+
</div>
|
271
|
+
</div>
|
272
|
+
<div class="method">
|
273
|
+
<div class="title">
|
274
|
+
<a name="M000015"></a><b>apache2ctl</b>()
|
275
|
+
</div>
|
276
|
+
<div class="description">
|
277
|
+
<p>
|
278
|
+
The absolute path to the ‘apachectl’ or ‘<a
|
279
|
+
href="PlatformInfo.html#M000015">apache2ctl</a>’ binary.
|
280
|
+
</p>
|
281
|
+
</div>
|
282
|
+
<div class="sourcecode">
|
283
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000015_source')" id="l_M000015_source">show source</a> ]</p>
|
284
|
+
<div id="M000015_source" class="dyn-source">
|
285
|
+
<pre>
|
286
|
+
<span class="ruby-comment cmt"># File lib/phusion_passenger/platform_info.rb, line 227</span>
|
287
|
+
227: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">apache2ctl</span>
|
288
|
+
228: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">find_apache2_executable</span>(<span class="ruby-value str">'apache2ctl'</span>, <span class="ruby-value str">'apachectl2'</span>, <span class="ruby-value str">'apachectl'</span>)
|
289
|
+
229: <span class="ruby-keyword kw">end</span>
|
290
|
+
</pre>
|
291
|
+
</div>
|
292
|
+
</div>
|
293
|
+
</div>
|
294
|
+
<div class="method">
|
295
|
+
<div class="title">
|
296
|
+
<a name="M000017"></a><b>apr_config</b>()
|
297
|
+
</div>
|
298
|
+
<div class="description">
|
299
|
+
<p>
|
190
300
|
The absolute path to the ‘apr-config’ or
|
191
301
|
‘apr-1-config’ executable.
|
192
|
-
|
193
|
-
</
|
194
|
-
|
195
|
-
<
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
</
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
<
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
</
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
</
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
<div class="
|
302
|
+
</p>
|
303
|
+
</div>
|
304
|
+
<div class="sourcecode">
|
305
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000017_source')" id="l_M000017_source">show source</a> ]</p>
|
306
|
+
<div id="M000017_source" class="dyn-source">
|
307
|
+
<pre>
|
308
|
+
<span class="ruby-comment cmt"># File lib/phusion_passenger/platform_info.rb, line 251</span>
|
309
|
+
251: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">apr_config</span>
|
310
|
+
252: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">env_defined?</span>(<span class="ruby-value str">'APR_CONFIG'</span>)
|
311
|
+
253: <span class="ruby-keyword kw">return</span> <span class="ruby-constant">ENV</span>[<span class="ruby-value str">'APR_CONFIG'</span>]
|
312
|
+
254: <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">apxs2</span>.<span class="ruby-identifier">nil?</span>
|
313
|
+
255: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">nil</span>
|
314
|
+
256: <span class="ruby-keyword kw">else</span>
|
315
|
+
257: <span class="ruby-identifier">filename</span> = <span class="ruby-node">`#{apxs2} -q APR_CONFIG 2>/dev/null`</span>.<span class="ruby-identifier">strip</span>
|
316
|
+
258: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">filename</span>.<span class="ruby-identifier">empty?</span>
|
317
|
+
259: <span class="ruby-identifier">apr_bindir</span> = <span class="ruby-node">`#{apxs2} -q APR_BINDIR 2>/dev/null`</span>.<span class="ruby-identifier">strip</span>
|
318
|
+
260: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">apr_bindir</span>.<span class="ruby-identifier">empty?</span>
|
319
|
+
261: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">nil</span>
|
320
|
+
262: <span class="ruby-keyword kw">else</span>
|
321
|
+
263: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">select_executable</span>(<span class="ruby-identifier">apr_bindir</span>,
|
322
|
+
264: <span class="ruby-value str">"apr-1-config"</span>, <span class="ruby-value str">"apr-config"</span>)
|
323
|
+
265: <span class="ruby-keyword kw">end</span>
|
324
|
+
266: <span class="ruby-keyword kw">elsif</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">exist?</span>(<span class="ruby-identifier">filename</span>)
|
325
|
+
267: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">filename</span>
|
326
|
+
268: <span class="ruby-keyword kw">else</span>
|
327
|
+
269: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">nil</span>
|
328
|
+
270: <span class="ruby-keyword kw">end</span>
|
329
|
+
271: <span class="ruby-keyword kw">end</span>
|
330
|
+
272: <span class="ruby-keyword kw">end</span>
|
331
|
+
</pre>
|
332
|
+
</div>
|
333
|
+
</div>
|
334
|
+
</div>
|
335
|
+
<div class="method">
|
336
|
+
<div class="title">
|
337
|
+
<a name="M000030"></a><b>apr_config_needed_for_building_apache_modules?</b>()
|
338
|
+
</div>
|
339
|
+
<div class="description">
|
340
|
+
<p>
|
341
|
+
Returns whether it is necessary to use information outputted by
|
342
|
+
‘apr-config’ and ‘apu-config’ in order to compile
|
343
|
+
an Apache module. When Apache is installed with —with-included-apr,
|
344
|
+
the APR/APU headers are placed into the same directory as the Apache
|
345
|
+
headers, and so ‘apr-config’ and ‘apu-config’
|
346
|
+
won‘t be necessary in that case.
|
347
|
+
</p>
|
348
|
+
</div>
|
349
|
+
<div class="sourcecode">
|
350
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000030_source')" id="l_M000030_source">show source</a> ]</p>
|
351
|
+
<div id="M000030_source" class="dyn-source">
|
352
|
+
<pre>
|
353
|
+
<span class="ruby-comment cmt"># File lib/phusion_passenger/platform_info.rb, line 446</span>
|
354
|
+
446: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">apr_config_needed_for_building_apache_modules?</span>
|
355
|
+
447: <span class="ruby-identifier">filename</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-node">"/tmp/passenger-platform-check-#{Process.pid}.c"</span>)
|
356
|
+
448: <span class="ruby-constant">File</span>.<span class="ruby-identifier">open</span>(<span class="ruby-identifier">filename</span>, <span class="ruby-value str">"w"</span>) <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">f</span><span class="ruby-operator">|</span>
|
357
|
+
449: <span class="ruby-identifier">f</span>.<span class="ruby-identifier">puts</span>(<span class="ruby-value str">"#include <apr.h>"</span>)
|
358
|
+
450: <span class="ruby-keyword kw">end</span>
|
359
|
+
451: <span class="ruby-keyword kw">begin</span>
|
360
|
+
452: <span class="ruby-keyword kw">return</span> <span class="ruby-operator">!</span><span class="ruby-identifier">system</span>(<span class="ruby-node">"(gcc #{apache2_module_cflags(false)} -c '#{filename}' -o '#{filename}.o') >/dev/null 2>/dev/null"</span>)
|
361
|
+
453: <span class="ruby-keyword kw">ensure</span>
|
362
|
+
454: <span class="ruby-constant">File</span>.<span class="ruby-identifier">unlink</span>(<span class="ruby-identifier">filename</span>) <span class="ruby-keyword kw">rescue</span> <span class="ruby-keyword kw">nil</span>
|
363
|
+
455: <span class="ruby-constant">File</span>.<span class="ruby-identifier">unlink</span>(<span class="ruby-node">"#{filename}.o"</span>) <span class="ruby-keyword kw">rescue</span> <span class="ruby-keyword kw">nil</span>
|
364
|
+
456: <span class="ruby-keyword kw">end</span>
|
365
|
+
457: <span class="ruby-keyword kw">end</span>
|
366
|
+
</pre>
|
367
|
+
</div>
|
368
|
+
</div>
|
369
|
+
</div>
|
370
|
+
<div class="method">
|
371
|
+
<div class="title">
|
372
|
+
<a name="M000026"></a><b>apr_flags</b>()
|
373
|
+
</div>
|
374
|
+
<div class="description">
|
375
|
+
<p>
|
376
|
+
The C compiler flags that are necessary for programs that use APR.
|
377
|
+
</p>
|
378
|
+
</div>
|
379
|
+
<div class="sourcecode">
|
380
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000026_source')" id="l_M000026_source">show source</a> ]</p>
|
381
|
+
<div id="M000026_source" class="dyn-source">
|
382
|
+
<pre>
|
383
|
+
<span class="ruby-comment cmt"># File lib/phusion_passenger/platform_info.rb, line 418</span>
|
384
|
+
418: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">apr_flags</span>
|
385
|
+
419: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">determine_apr_info</span>[<span class="ruby-value">0</span>]
|
386
|
+
420: <span class="ruby-keyword kw">end</span>
|
387
|
+
</pre>
|
388
|
+
</div>
|
389
|
+
</div>
|
390
|
+
</div>
|
391
|
+
<div class="method">
|
392
|
+
<div class="title">
|
393
|
+
<a name="M000027"></a><b>apr_libs</b>()
|
394
|
+
</div>
|
395
|
+
<div class="description">
|
396
|
+
<p>
|
397
|
+
The linker flags that are necessary for linking programs that use APR.
|
398
|
+
</p>
|
399
|
+
</div>
|
400
|
+
<div class="sourcecode">
|
401
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000027_source')" id="l_M000027_source">show source</a> ]</p>
|
402
|
+
<div id="M000027_source" class="dyn-source">
|
403
|
+
<pre>
|
404
|
+
<span class="ruby-comment cmt"># File lib/phusion_passenger/platform_info.rb, line 423</span>
|
405
|
+
423: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">apr_libs</span>
|
406
|
+
424: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">determine_apr_info</span>[<span class="ruby-value">1</span>]
|
407
|
+
425: <span class="ruby-keyword kw">end</span>
|
408
|
+
</pre>
|
409
|
+
</div>
|
410
|
+
</div>
|
411
|
+
</div>
|
412
|
+
<div class="method">
|
413
|
+
<div class="title">
|
414
|
+
<a name="M000018"></a><b>apu_config</b>()
|
415
|
+
</div>
|
416
|
+
<div class="description">
|
417
|
+
<p>
|
418
|
+
The absolute path to the ‘apu-config’ or
|
419
|
+
‘apu-1-config’ executable.
|
420
|
+
</p>
|
421
|
+
</div>
|
422
|
+
<div class="sourcecode">
|
423
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000018_source')" id="l_M000018_source">show source</a> ]</p>
|
424
|
+
<div id="M000018_source" class="dyn-source">
|
425
|
+
<pre>
|
426
|
+
<span class="ruby-comment cmt"># File lib/phusion_passenger/platform_info.rb, line 276</span>
|
427
|
+
276: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">apu_config</span>
|
428
|
+
277: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">env_defined?</span>(<span class="ruby-value str">'APU_CONFIG'</span>)
|
429
|
+
278: <span class="ruby-keyword kw">return</span> <span class="ruby-constant">ENV</span>[<span class="ruby-value str">'APU_CONFIG'</span>]
|
430
|
+
279: <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">apxs2</span>.<span class="ruby-identifier">nil?</span>
|
431
|
+
280: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">nil</span>
|
432
|
+
281: <span class="ruby-keyword kw">else</span>
|
433
|
+
282: <span class="ruby-identifier">filename</span> = <span class="ruby-node">`#{apxs2} -q APU_CONFIG 2>/dev/null`</span>.<span class="ruby-identifier">strip</span>
|
434
|
+
283: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">filename</span>.<span class="ruby-identifier">empty?</span>
|
435
|
+
284: <span class="ruby-identifier">apu_bindir</span> = <span class="ruby-node">`#{apxs2} -q APU_BINDIR 2>/dev/null`</span>.<span class="ruby-identifier">strip</span>
|
436
|
+
285: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">apu_bindir</span>.<span class="ruby-identifier">empty?</span>
|
437
|
+
286: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">nil</span>
|
438
|
+
287: <span class="ruby-keyword kw">else</span>
|
439
|
+
288: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">select_executable</span>(<span class="ruby-identifier">apu_bindir</span>,
|
440
|
+
289: <span class="ruby-value str">"apu-1-config"</span>, <span class="ruby-value str">"apu-config"</span>)
|
441
|
+
290: <span class="ruby-keyword kw">end</span>
|
442
|
+
291: <span class="ruby-keyword kw">elsif</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">exist?</span>(<span class="ruby-identifier">filename</span>)
|
443
|
+
292: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">filename</span>
|
444
|
+
293: <span class="ruby-keyword kw">else</span>
|
445
|
+
294: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">nil</span>
|
446
|
+
295: <span class="ruby-keyword kw">end</span>
|
447
|
+
296: <span class="ruby-keyword kw">end</span>
|
448
|
+
297: <span class="ruby-keyword kw">end</span>
|
449
|
+
</pre>
|
450
|
+
</div>
|
451
|
+
</div>
|
452
|
+
</div>
|
453
|
+
<div class="method">
|
454
|
+
<div class="title">
|
455
|
+
<a name="M000028"></a><b>apu_flags</b>()
|
456
|
+
</div>
|
457
|
+
<div class="description">
|
458
|
+
<p>
|
459
|
+
The C compiler flags that are necessary for programs that use APR-Util.
|
460
|
+
</p>
|
461
|
+
</div>
|
462
|
+
<div class="sourcecode">
|
463
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000028_source')" id="l_M000028_source">show source</a> ]</p>
|
464
|
+
<div id="M000028_source" class="dyn-source">
|
465
|
+
<pre>
|
466
|
+
<span class="ruby-comment cmt"># File lib/phusion_passenger/platform_info.rb, line 428</span>
|
467
|
+
428: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">apu_flags</span>
|
468
|
+
429: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">determine_apu_info</span>[<span class="ruby-value">0</span>]
|
469
|
+
430: <span class="ruby-keyword kw">end</span>
|
470
|
+
</pre>
|
471
|
+
</div>
|
472
|
+
</div>
|
473
|
+
</div>
|
474
|
+
<div class="method">
|
475
|
+
<div class="title">
|
476
|
+
<a name="M000029"></a><b>apu_libs</b>()
|
477
|
+
</div>
|
478
|
+
<div class="description">
|
479
|
+
<p>
|
480
|
+
The linker flags that are necessary for linking programs that use APR-Util.
|
481
|
+
</p>
|
482
|
+
</div>
|
483
|
+
<div class="sourcecode">
|
484
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000029_source')" id="l_M000029_source">show source</a> ]</p>
|
485
|
+
<div id="M000029_source" class="dyn-source">
|
486
|
+
<pre>
|
487
|
+
<span class="ruby-comment cmt"># File lib/phusion_passenger/platform_info.rb, line 433</span>
|
488
|
+
433: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">apu_libs</span>
|
489
|
+
434: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">determine_apu_info</span>[<span class="ruby-value">1</span>]
|
490
|
+
435: <span class="ruby-keyword kw">end</span>
|
491
|
+
</pre>
|
492
|
+
</div>
|
493
|
+
</div>
|
494
|
+
</div>
|
495
|
+
<div class="method">
|
496
|
+
<div class="title">
|
497
|
+
<a name="M000014"></a><b>apxs2</b>()
|
498
|
+
</div>
|
499
|
+
<div class="description">
|
500
|
+
<p>
|
501
|
+
The absolute path to the ‘apxs’ or ‘<a
|
502
|
+
href="PlatformInfo.html#M000014">apxs2</a>’ executable, or nil if not
|
503
|
+
found.
|
504
|
+
</p>
|
505
|
+
</div>
|
506
|
+
<div class="sourcecode">
|
507
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000014_source')" id="l_M000014_source">show source</a> ]</p>
|
508
|
+
<div id="M000014_source" class="dyn-source">
|
509
|
+
<pre>
|
510
|
+
<span class="ruby-comment cmt"># File lib/phusion_passenger/platform_info.rb, line 212</span>
|
511
|
+
212: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">apxs2</span>
|
512
|
+
213: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">env_defined?</span>(<span class="ruby-value str">"APXS2"</span>)
|
513
|
+
214: <span class="ruby-keyword kw">return</span> <span class="ruby-constant">ENV</span>[<span class="ruby-value str">"APXS2"</span>]
|
514
|
+
215: <span class="ruby-keyword kw">end</span>
|
515
|
+
216: [<span class="ruby-value str">'apxs2'</span>, <span class="ruby-value str">'apxs'</span>].<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">name</span><span class="ruby-operator">|</span>
|
516
|
+
217: <span class="ruby-identifier">command</span> = <span class="ruby-identifier">find_command</span>(<span class="ruby-identifier">name</span>)
|
517
|
+
218: <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">command</span>.<span class="ruby-identifier">nil?</span>
|
518
|
+
219: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">command</span>
|
519
|
+
220: <span class="ruby-keyword kw">end</span>
|
520
|
+
221: <span class="ruby-keyword kw">end</span>
|
521
|
+
222: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">nil</span>
|
522
|
+
223: <span class="ruby-keyword kw">end</span>
|
523
|
+
</pre>
|
524
|
+
</div>
|
525
|
+
</div>
|
526
|
+
</div>
|
527
|
+
<div class="method">
|
528
|
+
<div class="title">
|
529
|
+
<a name="M000023"></a><b>debugging_cflags</b>()
|
530
|
+
</div>
|
531
|
+
<div class="description">
|
532
|
+
<p>
|
533
|
+
C compiler flags that should be passed in order to enable debugging
|
534
|
+
information.
|
535
|
+
</p>
|
536
|
+
</div>
|
537
|
+
<div class="sourcecode">
|
538
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000023_source')" id="l_M000023_source">show source</a> ]</p>
|
539
|
+
<div id="M000023_source" class="dyn-source">
|
540
|
+
<pre>
|
541
|
+
<span class="ruby-comment cmt"># File lib/phusion_passenger/platform_info.rb, line 359</span>
|
542
|
+
359: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">debugging_cflags</span>
|
543
|
+
360: <span class="ruby-keyword kw">if</span> <span class="ruby-constant">RUBY_PLATFORM</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/openbsd/</span>
|
544
|
+
361: <span class="ruby-comment cmt"># According to OpenBSD's pthreads man page, pthreads do not work</span>
|
545
|
+
362: <span class="ruby-comment cmt"># correctly when an app is compiled with -g. It recommends using</span>
|
546
|
+
363: <span class="ruby-comment cmt"># -ggdb instead.</span>
|
547
|
+
364: <span class="ruby-keyword kw">return</span> <span class="ruby-value str">'-ggdb'</span>
|
548
|
+
365: <span class="ruby-keyword kw">else</span>
|
549
|
+
366: <span class="ruby-keyword kw">return</span> <span class="ruby-value str">'-g'</span>
|
550
|
+
367: <span class="ruby-keyword kw">end</span>
|
551
|
+
368: <span class="ruby-keyword kw">end</span>
|
552
|
+
</pre>
|
553
|
+
</div>
|
554
|
+
</div>
|
555
|
+
</div>
|
265
556
|
<div class="method">
|
266
557
|
<div class="title">
|
267
|
-
<a name="
|
558
|
+
<a name="M000011"></a><b>find_command</b>(name)
|
268
559
|
</div>
|
269
560
|
<div class="description">
|
270
561
|
<p>
|
@@ -277,19 +568,232 @@ always behave correctly, for some weird reason.
|
|
277
568
|
</p>
|
278
569
|
</div>
|
279
570
|
<div class="sourcecode">
|
280
|
-
<p class="source-link">[ <a href="javascript:toggleSource('
|
281
|
-
<div id="
|
571
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000011_source')" id="l_M000011_source">show source</a> ]</p>
|
572
|
+
<div id="M000011_source" class="dyn-source">
|
573
|
+
<pre>
|
574
|
+
<span class="ruby-comment cmt"># File lib/phusion_passenger/platform_info.rb, line 181</span>
|
575
|
+
181: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">find_command</span>(<span class="ruby-identifier">name</span>)
|
576
|
+
182: <span class="ruby-constant">ENV</span>[<span class="ruby-value str">'PATH'</span>].<span class="ruby-identifier">split</span>(<span class="ruby-constant">File</span><span class="ruby-operator">::</span><span class="ruby-constant">PATH_SEPARATOR</span>).<span class="ruby-identifier">detect</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">directory</span><span class="ruby-operator">|</span>
|
577
|
+
183: <span class="ruby-identifier">path</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-identifier">directory</span>, <span class="ruby-identifier">name</span>.<span class="ruby-identifier">to_s</span>)
|
578
|
+
184: <span class="ruby-keyword kw">if</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">executable?</span>(<span class="ruby-identifier">path</span>)
|
579
|
+
185: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">path</span>
|
580
|
+
186: <span class="ruby-keyword kw">end</span>
|
581
|
+
187: <span class="ruby-keyword kw">end</span>
|
582
|
+
188: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">nil</span>
|
583
|
+
189: <span class="ruby-keyword kw">end</span>
|
584
|
+
</pre>
|
585
|
+
</div>
|
586
|
+
</div>
|
587
|
+
</div>
|
588
|
+
<div class="method">
|
589
|
+
<div class="title">
|
590
|
+
<a name="M000016"></a><b>httpd</b>()
|
591
|
+
</div>
|
592
|
+
<div class="description">
|
593
|
+
<p>
|
594
|
+
The absolute path to the Apache binary (that is, ‘<a
|
595
|
+
href="PlatformInfo.html#M000016">httpd</a>’, ‘httpd2’,
|
596
|
+
‘apache’ or ‘apache2’).
|
597
|
+
</p>
|
598
|
+
</div>
|
599
|
+
<div class="sourcecode">
|
600
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000016_source')" id="l_M000016_source">show source</a> ]</p>
|
601
|
+
<div id="M000016_source" class="dyn-source">
|
602
|
+
<pre>
|
603
|
+
<span class="ruby-comment cmt"># File lib/phusion_passenger/platform_info.rb, line 233</span>
|
604
|
+
233: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">httpd</span>
|
605
|
+
234: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">env_defined?</span>(<span class="ruby-value str">'HTTPD'</span>)
|
606
|
+
235: <span class="ruby-keyword kw">return</span> <span class="ruby-constant">ENV</span>[<span class="ruby-value str">'HTTPD'</span>]
|
607
|
+
236: <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">apxs2</span>.<span class="ruby-identifier">nil?</span>
|
608
|
+
237: [<span class="ruby-value str">"apache2"</span>, <span class="ruby-value str">"httpd2"</span>, <span class="ruby-value str">"apache"</span>, <span class="ruby-value str">"httpd"</span>].<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">name</span><span class="ruby-operator">|</span>
|
609
|
+
238: <span class="ruby-identifier">command</span> = <span class="ruby-identifier">find_command</span>(<span class="ruby-identifier">name</span>)
|
610
|
+
239: <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">command</span>.<span class="ruby-identifier">nil?</span>
|
611
|
+
240: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">command</span>
|
612
|
+
241: <span class="ruby-keyword kw">end</span>
|
613
|
+
242: <span class="ruby-keyword kw">end</span>
|
614
|
+
243: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">nil</span>
|
615
|
+
244: <span class="ruby-keyword kw">else</span>
|
616
|
+
245: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">find_apache2_executable</span>(<span class="ruby-node">`#{apxs2} -q TARGET`</span>.<span class="ruby-identifier">strip</span>)
|
617
|
+
246: <span class="ruby-keyword kw">end</span>
|
618
|
+
247: <span class="ruby-keyword kw">end</span>
|
619
|
+
</pre>
|
620
|
+
</div>
|
621
|
+
</div>
|
622
|
+
</div>
|
623
|
+
<div class="method">
|
624
|
+
<div class="title">
|
625
|
+
<a name="M000031"></a><b>library_extension</b>()
|
626
|
+
</div>
|
627
|
+
<div class="description">
|
628
|
+
<p>
|
629
|
+
The current platform‘s shared library extension (‘so’ on
|
630
|
+
most Unices).
|
631
|
+
</p>
|
632
|
+
</div>
|
633
|
+
<div class="sourcecode">
|
634
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000031_source')" id="l_M000031_source">show source</a> ]</p>
|
635
|
+
<div id="M000031_source" class="dyn-source">
|
636
|
+
<pre>
|
637
|
+
<span class="ruby-comment cmt"># File lib/phusion_passenger/platform_info.rb, line 461</span>
|
638
|
+
461: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">library_extension</span>
|
639
|
+
462: <span class="ruby-keyword kw">if</span> <span class="ruby-constant">RUBY_PLATFORM</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/darwin/</span>
|
640
|
+
463: <span class="ruby-keyword kw">return</span> <span class="ruby-value str">"bundle"</span>
|
641
|
+
464: <span class="ruby-keyword kw">else</span>
|
642
|
+
465: <span class="ruby-keyword kw">return</span> <span class="ruby-value str">"so"</span>
|
643
|
+
466: <span class="ruby-keyword kw">end</span>
|
644
|
+
467: <span class="ruby-keyword kw">end</span>
|
645
|
+
</pre>
|
646
|
+
</div>
|
647
|
+
</div>
|
648
|
+
</div>
|
649
|
+
<div class="method">
|
650
|
+
<div class="title">
|
651
|
+
<a name="M000032"></a><b>linux_distro</b>()
|
652
|
+
</div>
|
653
|
+
<div class="description">
|
654
|
+
<p>
|
655
|
+
An identifier for the current Linux distribution. nil if the operating
|
656
|
+
system is not Linux.
|
657
|
+
</p>
|
658
|
+
</div>
|
659
|
+
<div class="sourcecode">
|
660
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000032_source')" id="l_M000032_source">show source</a> ]</p>
|
661
|
+
<div id="M000032_source" class="dyn-source">
|
662
|
+
<pre>
|
663
|
+
<span class="ruby-comment cmt"># File lib/phusion_passenger/platform_info.rb, line 470</span>
|
664
|
+
470: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">linux_distro</span>
|
665
|
+
471: <span class="ruby-keyword kw">if</span> <span class="ruby-constant">RUBY_PLATFORM</span> <span class="ruby-operator">!~</span> <span class="ruby-regexp re">/linux/</span>
|
666
|
+
472: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">nil</span>
|
667
|
+
473: <span class="ruby-keyword kw">end</span>
|
668
|
+
474: <span class="ruby-identifier">lsb_release</span> = <span class="ruby-identifier">read_file</span>(<span class="ruby-value str">"/etc/lsb-release"</span>)
|
669
|
+
475: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">lsb_release</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/Ubuntu/</span>
|
670
|
+
476: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">:ubuntu</span>
|
671
|
+
477: <span class="ruby-keyword kw">elsif</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">exist?</span>(<span class="ruby-value str">"/etc/debian_version"</span>)
|
672
|
+
478: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">:debian</span>
|
673
|
+
479: <span class="ruby-keyword kw">elsif</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">exist?</span>(<span class="ruby-value str">"/etc/redhat-release"</span>)
|
674
|
+
480: <span class="ruby-identifier">redhat_release</span> = <span class="ruby-identifier">read_file</span>(<span class="ruby-value str">"/etc/redhat-release"</span>)
|
675
|
+
481: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">redhat_release</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/CentOS/</span>
|
676
|
+
482: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">:centos</span>
|
677
|
+
483: <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">redhat_release</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/Fedora/</span> <span class="ruby-comment cmt"># is this correct?</span>
|
678
|
+
484: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">:fedora</span>
|
679
|
+
485: <span class="ruby-keyword kw">else</span>
|
680
|
+
486: <span class="ruby-comment cmt"># On official RHEL distros, the content is in the form of</span>
|
681
|
+
487: <span class="ruby-comment cmt"># "Red Hat Enterprise Linux Server release 5.1 (Tikanga)"</span>
|
682
|
+
488: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">:rhel</span>
|
683
|
+
489: <span class="ruby-keyword kw">end</span>
|
684
|
+
490: <span class="ruby-keyword kw">elsif</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">exist?</span>(<span class="ruby-value str">"/etc/suse-release"</span>)
|
685
|
+
491: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">:suse</span>
|
686
|
+
492: <span class="ruby-keyword kw">elsif</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">exist?</span>(<span class="ruby-value str">"/etc/gentoo-release"</span>)
|
687
|
+
493: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">:gentoo</span>
|
688
|
+
494: <span class="ruby-keyword kw">else</span>
|
689
|
+
495: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">:unknown</span>
|
690
|
+
496: <span class="ruby-keyword kw">end</span>
|
691
|
+
497: <span class="ruby-comment cmt"># TODO: Slackware, Mandrake/Mandriva</span>
|
692
|
+
498: <span class="ruby-keyword kw">end</span>
|
693
|
+
</pre>
|
694
|
+
</div>
|
695
|
+
</div>
|
696
|
+
</div>
|
697
|
+
<div class="method">
|
698
|
+
<div class="title">
|
699
|
+
<a name="M000021"></a><b>portability_cflags</b>()
|
700
|
+
</div>
|
701
|
+
<div class="description">
|
702
|
+
<p>
|
703
|
+
Compiler flags that should be used for compiling every C/C++ program, for
|
704
|
+
portability reasons. These flags should be specified as last when invoking
|
705
|
+
the compiler.
|
706
|
+
</p>
|
707
|
+
</div>
|
708
|
+
<div class="sourcecode">
|
709
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000021_source')" id="l_M000021_source">show source</a> ]</p>
|
710
|
+
<div id="M000021_source" class="dyn-source">
|
711
|
+
<pre>
|
712
|
+
<span class="ruby-comment cmt"># File lib/phusion_passenger/platform_info.rb, line 331</span>
|
713
|
+
331: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">portability_cflags</span>
|
714
|
+
332: <span class="ruby-comment cmt"># _GLIBCPP__PTHREADS is for fixing Boost compilation on OpenBSD.</span>
|
715
|
+
333: <span class="ruby-identifier">flags</span> = [<span class="ruby-value str">"-D_REENTRANT -D_GLIBCPP__PTHREADS -I/usr/local/include"</span>]
|
716
|
+
334: <span class="ruby-keyword kw">if</span> <span class="ruby-constant">RUBY_PLATFORM</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/solaris/</span>
|
717
|
+
335: <span class="ruby-identifier">flags</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">'-D_XOPEN_SOURCE=500 -D_XPG4_2 -D__EXTENSIONS__ -D__SOLARIS__'</span>
|
718
|
+
336: <span class="ruby-identifier">flags</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">'-DBOOST_HAS_STDINT_H'</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-constant">RUBY_PLATFORM</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/solaris2.9/</span>
|
719
|
+
337: <span class="ruby-identifier">flags</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">'-D__SOLARIS9__ -DBOOST__STDC_CONSTANT_MACROS_DEFINED'</span> <span class="ruby-keyword kw">if</span> <span class="ruby-constant">RUBY_PLATFORM</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/solaris2.9/</span>
|
720
|
+
338: <span class="ruby-identifier">flags</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">'-mcpu=ultrasparc'</span> <span class="ruby-keyword kw">if</span> <span class="ruby-constant">RUBY_PLATFORM</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/sparc/</span>
|
721
|
+
339: <span class="ruby-keyword kw">elsif</span> <span class="ruby-constant">RUBY_PLATFORM</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/openbsd/</span>
|
722
|
+
340: <span class="ruby-identifier">flags</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">'-DBOOST_HAS_STDINT_H'</span>
|
723
|
+
341: <span class="ruby-keyword kw">end</span>
|
724
|
+
342: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">flags</span>.<span class="ruby-identifier">compact</span>.<span class="ruby-identifier">join</span>(<span class="ruby-value str">" "</span>).<span class="ruby-identifier">strip</span>
|
725
|
+
343: <span class="ruby-keyword kw">end</span>
|
726
|
+
</pre>
|
727
|
+
</div>
|
728
|
+
</div>
|
729
|
+
</div>
|
730
|
+
<div class="method">
|
731
|
+
<div class="title">
|
732
|
+
<a name="M000022"></a><b>portability_ldflags</b>()
|
733
|
+
</div>
|
734
|
+
<div class="description">
|
735
|
+
<p>
|
736
|
+
Linker flags that should be used for linking every C/C++ program, for
|
737
|
+
portability reasons. These flags should be specified as last when invoking
|
738
|
+
the linker.
|
739
|
+
</p>
|
740
|
+
</div>
|
741
|
+
<div class="sourcecode">
|
742
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000022_source')" id="l_M000022_source">show source</a> ]</p>
|
743
|
+
<div id="M000022_source" class="dyn-source">
|
744
|
+
<pre>
|
745
|
+
<span class="ruby-comment cmt"># File lib/phusion_passenger/platform_info.rb, line 349</span>
|
746
|
+
349: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">portability_ldflags</span>
|
747
|
+
350: <span class="ruby-keyword kw">if</span> <span class="ruby-constant">RUBY_PLATFORM</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/solaris/</span>
|
748
|
+
351: <span class="ruby-keyword kw">return</span> <span class="ruby-value str">'-lxnet -lrt -lsocket -lnsl -lpthread'</span>
|
749
|
+
352: <span class="ruby-keyword kw">else</span>
|
750
|
+
353: <span class="ruby-keyword kw">return</span> <span class="ruby-value str">'-lpthread'</span>
|
751
|
+
354: <span class="ruby-keyword kw">end</span>
|
752
|
+
355: <span class="ruby-keyword kw">end</span>
|
753
|
+
</pre>
|
754
|
+
</div>
|
755
|
+
</div>
|
756
|
+
</div>
|
757
|
+
<div class="method">
|
758
|
+
<div class="title">
|
759
|
+
<a name="M000012"></a><b>rake</b>()
|
760
|
+
</div>
|
761
|
+
<div class="description">
|
762
|
+
<p>
|
763
|
+
Returns the absolute path to the Rake executable that belongs to the
|
764
|
+
current Ruby interpreter. Returns nil if it doesn‘t exist.
|
765
|
+
</p>
|
766
|
+
</div>
|
767
|
+
<div class="sourcecode">
|
768
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000012_source')" id="l_M000012_source">show source</a> ]</p>
|
769
|
+
<div id="M000012_source" class="dyn-source">
|
770
|
+
<pre>
|
771
|
+
<span class="ruby-comment cmt"># File lib/phusion_passenger/platform_info.rb, line 198</span>
|
772
|
+
198: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">rake</span>
|
773
|
+
199: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">locate_ruby_executable</span>(<span class="ruby-value str">'rake'</span>)
|
774
|
+
200: <span class="ruby-keyword kw">end</span>
|
775
|
+
</pre>
|
776
|
+
</div>
|
777
|
+
</div>
|
778
|
+
</div>
|
779
|
+
<div class="method">
|
780
|
+
<div class="title">
|
781
|
+
<a name="M000013"></a><b>rspec</b>()
|
782
|
+
</div>
|
783
|
+
<div class="description">
|
784
|
+
<p>
|
785
|
+
Returns the absolute path to the RSpec runner program that belongs to the
|
786
|
+
current Ruby interpreter. Returns nil if it doesn‘t exist.
|
787
|
+
</p>
|
788
|
+
</div>
|
789
|
+
<div class="sourcecode">
|
790
|
+
<p class="source-link">[ <a href="javascript:toggleSource('M000013_source')" id="l_M000013_source">show source</a> ]</p>
|
791
|
+
<div id="M000013_source" class="dyn-source">
|
282
792
|
<pre>
|
283
|
-
<span class="ruby-comment cmt"># File lib/
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
263: <span class="ruby-keyword kw">if</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">executable?</span>(<span class="ruby-identifier">path</span>)
|
288
|
-
264: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">path</span>
|
289
|
-
265: <span class="ruby-keyword kw">end</span>
|
290
|
-
266: <span class="ruby-keyword kw">end</span>
|
291
|
-
267: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">nil</span>
|
292
|
-
268: <span class="ruby-keyword kw">end</span>
|
793
|
+
<span class="ruby-comment cmt"># File lib/phusion_passenger/platform_info.rb, line 206</span>
|
794
|
+
206: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">rspec</span>
|
795
|
+
207: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">locate_ruby_executable</span>(<span class="ruby-value str">'spec'</span>)
|
796
|
+
208: <span class="ruby-keyword kw">end</span>
|
293
797
|
</pre>
|
294
798
|
</div>
|
295
799
|
</div>
|