passenger 6.0.27 → 6.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG +11 -1
  3. data/CONTRIBUTORS +2 -0
  4. data/bin/passenger-install-apache2-module +6 -3
  5. data/bin/passenger-install-nginx-module +8 -3
  6. data/build/support/cxx_dependency_map.rb +3 -621
  7. data/dev/index_cxx_dependencies.rb +4 -0
  8. data/package.json +1 -1
  9. data/src/agent/Core/ApplicationPool/Implementation.cpp +1 -1
  10. data/src/agent/Core/ApplicationPool/Socket.h +3 -3
  11. data/src/agent/Core/ApplicationPool/TestSession.h +3 -4
  12. data/src/agent/Core/Config.h +1 -6
  13. data/src/agent/Core/Controller/Config.h +1 -1
  14. data/src/agent/Core/CoreMain.cpp +1 -0
  15. data/src/agent/Core/SecurityUpdateChecker.h +10 -1
  16. data/src/agent/Core/SpawningKit/Exceptions.h +0 -1
  17. data/src/agent/Core/SpawningKit/Handshake/Perform.h +13 -2
  18. data/src/agent/Shared/Fundamentals/AbortHandler.cpp +23 -5
  19. data/src/agent/Shared/Fundamentals/AbortHandler.h +10 -22
  20. data/src/agent/Shared/Fundamentals/Initialization.cpp +1 -0
  21. data/src/agent/Watchdog/Config.h +1 -1
  22. data/src/apache2_module/ConfigGeneral/AutoGeneratedDefinitions.cpp +5 -0
  23. data/src/apache2_module/ConfigGeneral/AutoGeneratedManifestDefaultsInitialization.cpp +5 -0
  24. data/src/apache2_module/ConfigGeneral/AutoGeneratedSetterFuncs.cpp +14 -0
  25. data/src/apache2_module/DirConfig/AutoGeneratedCreateFunction.cpp +3 -0
  26. data/src/apache2_module/DirConfig/AutoGeneratedHeaderSerialization.cpp +3 -0
  27. data/src/apache2_module/DirConfig/AutoGeneratedManifestGeneration.cpp +11 -0
  28. data/src/apache2_module/DirConfig/AutoGeneratedMergeFunction.cpp +7 -0
  29. data/src/apache2_module/DirConfig/AutoGeneratedStruct.h +17 -0
  30. data/src/apache2_module/Hooks.cpp +0 -6
  31. data/src/cxx_supportlib/ConfigKit/IN_PRACTICE.md +2 -12
  32. data/src/cxx_supportlib/ConfigKit/Store.h +1 -6
  33. data/src/cxx_supportlib/Constants.h +1 -1
  34. data/src/cxx_supportlib/DataStructures/StringKeyTable.h +1 -7
  35. data/src/cxx_supportlib/Exceptions.cpp +178 -0
  36. data/src/cxx_supportlib/Exceptions.h +62 -177
  37. data/src/cxx_supportlib/IOTools/IOUtils.cpp +255 -228
  38. data/src/cxx_supportlib/IOTools/IOUtils.h +84 -121
  39. data/src/cxx_supportlib/ServerKit/Config.h +1 -6
  40. data/src/cxx_supportlib/ServerKit/FileBufferedChannel.h +1 -1
  41. data/src/cxx_supportlib/StaticString.h +1 -6
  42. data/src/cxx_supportlib/Utils/Curl.h +1 -6
  43. data/src/cxx_supportlib/Utils/ScopeGuard.h +0 -32
  44. data/src/cxx_supportlib/oxt/implementation.cpp +2 -2
  45. data/src/cxx_supportlib/oxt/spin_lock.hpp +94 -23
  46. data/src/ruby_supportlib/phusion_passenger/platform_info/compiler.rb +6 -10
  47. data/src/ruby_supportlib/phusion_passenger/platform_info/cxx_portability.rb +2 -2
  48. data/src/ruby_supportlib/phusion_passenger/rack_handler.rb +2 -2
  49. data/src/ruby_supportlib/phusion_passenger.rb +1 -1
  50. metadata +3 -7
  51. data/src/cxx_supportlib/oxt/detail/spin_lock_darwin.hpp +0 -75
  52. data/src/cxx_supportlib/oxt/detail/spin_lock_gcc_x86.hpp +0 -85
  53. data/src/cxx_supportlib/oxt/detail/spin_lock_portable.hpp +0 -38
  54. data/src/cxx_supportlib/oxt/detail/spin_lock_pthreads.hpp +0 -111
@@ -1,75 +0,0 @@
1
- /*
2
- * OXT - OS eXtensions for boosT
3
- * Provides important functionality necessary for writing robust server software.
4
- *
5
- * Copyright (c) 2010-2025 Asynchronous B.V.
6
- *
7
- * Permission is hereby granted, free of charge, to any person obtaining a copy
8
- * of this software and associated documentation files (the "Software"), to deal
9
- * in the Software without restriction, including without limitation the rights
10
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
- * copies of the Software, and to permit persons to whom the Software is
12
- * furnished to do so, subject to the following conditions:
13
- *
14
- * The above copyright notice and this permission notice shall be included in
15
- * all copies or substantial portions of the Software.
16
- *
17
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23
- * THE SOFTWARE.
24
- */
25
-
26
- #define OSSPINLOCK_DEPRECATED 0
27
-
28
- #include <libkern/OSAtomic.h>
29
- #include <boost/noncopyable.hpp>
30
-
31
- /*
32
- * Implementation of a spin lock using Darwin spin locks.
33
- *
34
- * See spin_lock_gcc_x86.hpp for API documentation.
35
- */
36
-
37
- namespace oxt {
38
-
39
- class spin_lock {
40
- private:
41
- OSSpinLock spin;
42
-
43
- public:
44
- class scoped_lock: boost::noncopyable {
45
- private:
46
- spin_lock &l;
47
-
48
- public:
49
- scoped_lock(spin_lock &lock): l(lock) {
50
- l.lock();
51
- }
52
-
53
- ~scoped_lock() {
54
- l.unlock();
55
- }
56
- };
57
-
58
- spin_lock() {
59
- spin = 0;
60
- }
61
-
62
- void lock() {
63
- OSSpinLockLock(&spin);
64
- }
65
-
66
- void unlock() {
67
- OSSpinLockUnlock(&spin);
68
- }
69
-
70
- bool try_lock() {
71
- return OSSpinLockTry(&spin);
72
- }
73
- };
74
-
75
- } // namespace oxt
@@ -1,85 +0,0 @@
1
- /*
2
- * OXT - OS eXtensions for boosT
3
- * Provides important functionality necessary for writing robust server software.
4
- *
5
- * Copyright (c) 2010-2025 Asynchronous B.V.
6
- *
7
- * Permission is hereby granted, free of charge, to any person obtaining a copy
8
- * of this software and associated documentation files (the "Software"), to deal
9
- * in the Software without restriction, including without limitation the rights
10
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
- * copies of the Software, and to permit persons to whom the Software is
12
- * furnished to do so, subject to the following conditions:
13
- *
14
- * The above copyright notice and this permission notice shall be included in
15
- * all copies or substantial portions of the Software.
16
- *
17
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23
- * THE SOFTWARE.
24
- */
25
-
26
- #include <boost/noncopyable.hpp>
27
-
28
- namespace oxt {
29
-
30
- /**
31
- * A spin lock. It's more efficient than a mutex for locking very small
32
- * critical sections with few contentions, but less efficient otherwise.
33
- *
34
- * The interface is similar to that of boost::mutex.
35
- */
36
- class spin_lock {
37
- private:
38
- volatile int exclusion;
39
-
40
- public:
41
- /**
42
- * Instantiate this class to lock a spin lock within a scope.
43
- */
44
- class scoped_lock: boost::noncopyable {
45
- private:
46
- spin_lock &l;
47
-
48
- public:
49
- scoped_lock(spin_lock &lock): l(lock) {
50
- l.lock();
51
- }
52
-
53
- ~scoped_lock() {
54
- l.unlock();
55
- }
56
- };
57
-
58
- spin_lock(): exclusion(0) { }
59
-
60
- /**
61
- * Lock this spin lock.
62
- * @throws boost::thread_resource_error Something went wrong.
63
- */
64
- void lock() {
65
- while (__sync_lock_test_and_set(&exclusion, 1)) {
66
- // Do nothing. This GCC builtin instruction
67
- // ensures memory barrier.
68
- }
69
- }
70
-
71
- /**
72
- * Unlock this spin lock.
73
- * @throws boost::thread_resource_error Something went wrong.
74
- */
75
- void unlock() {
76
- __sync_lock_release(&exclusion);
77
- }
78
-
79
- bool try_lock() {
80
- return !__sync_lock_test_and_set(&exclusion, 1);
81
- }
82
- };
83
-
84
- } // namespace oxt
85
-
@@ -1,38 +0,0 @@
1
- /*
2
- * OXT - OS eXtensions for boosT
3
- * Provides important functionality necessary for writing robust server software.
4
- *
5
- * Copyright (c) 2010-2025 Asynchronous B.V.
6
- *
7
- * Permission is hereby granted, free of charge, to any person obtaining a copy
8
- * of this software and associated documentation files (the "Software"), to deal
9
- * in the Software without restriction, including without limitation the rights
10
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
- * copies of the Software, and to permit persons to whom the Software is
12
- * furnished to do so, subject to the following conditions:
13
- *
14
- * The above copyright notice and this permission notice shall be included in
15
- * all copies or substantial portions of the Software.
16
- *
17
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23
- * THE SOFTWARE.
24
- */
25
-
26
- /*
27
- * Portable implementation of a spin lock.
28
- * This is actually just a mutex...
29
- *
30
- * See spin_lock_gcc_x86.hpp for API documentation.
31
- */
32
-
33
- #include <boost/thread/mutex.hpp>
34
-
35
- namespace oxt {
36
- typedef boost::mutex spin_lock;
37
- }
38
-
@@ -1,111 +0,0 @@
1
- /*
2
- * OXT - OS eXtensions for boosT
3
- * Provides important functionality necessary for writing robust server software.
4
- *
5
- * Copyright (c) 2010-2025 Asynchronous B.V.
6
- *
7
- * Permission is hereby granted, free of charge, to any person obtaining a copy
8
- * of this software and associated documentation files (the "Software"), to deal
9
- * in the Software without restriction, including without limitation the rights
10
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
- * copies of the Software, and to permit persons to whom the Software is
12
- * furnished to do so, subject to the following conditions:
13
- *
14
- * The above copyright notice and this permission notice shall be included in
15
- * all copies or substantial portions of the Software.
16
- *
17
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23
- * THE SOFTWARE.
24
- */
25
-
26
- #include <boost/noncopyable.hpp>
27
- #include <pthread.h>
28
- #include <errno.h>
29
- #include "../macros.hpp"
30
-
31
- /*
32
- * Implementation of a spin lock using POSIX pthread spin locks.
33
- *
34
- * See spin_lock_gcc_x86.hpp for API documentation.
35
- */
36
-
37
- namespace oxt {
38
-
39
- class spin_lock {
40
- private:
41
- pthread_spinlock_t spin;
42
-
43
- public:
44
- class scoped_lock: boost::noncopyable {
45
- private:
46
- spin_lock &l;
47
-
48
- public:
49
- scoped_lock(spin_lock &lock): l(lock) {
50
- l.lock();
51
- }
52
-
53
- ~scoped_lock() {
54
- l.unlock();
55
- }
56
- };
57
-
58
- spin_lock() {
59
- int ret;
60
- do {
61
- ret = pthread_spin_init(&spin, PTHREAD_PROCESS_PRIVATE);
62
- } while (ret == EINTR);
63
- if (ret != 0) {
64
- throw boost::thread_resource_error(ret, "Cannot initialize a spin lock");
65
- }
66
- }
67
-
68
- ~spin_lock() {
69
- int ret;
70
- do {
71
- ret = pthread_spin_destroy(&spin);
72
- } while (ret == EINTR);
73
- }
74
-
75
- void lock() {
76
- int ret;
77
- do {
78
- ret = pthread_spin_lock(&spin);
79
- } while (OXT_UNLIKELY(ret == EINTR));
80
- if (OXT_UNLIKELY(ret != 0)) {
81
- throw boost::thread_resource_error(ret, "Cannot lock spin lock");
82
- }
83
- }
84
-
85
- void unlock() {
86
- int ret;
87
- do {
88
- ret = pthread_spin_unlock(&spin);
89
- } while (OXT_UNLIKELY(ret == EINTR));
90
- if (OXT_UNLIKELY(ret != 0)) {
91
- throw boost::thread_resource_error(ret, "Cannot unlock spin lock");
92
- }
93
- }
94
-
95
- bool try_lock() {
96
- int ret;
97
- do {
98
- ret = pthread_spin_trylock(&spin);
99
- } while (OXT_UNLIKELY(ret == EINTR));
100
- if (ret == 0) {
101
- return true;
102
- } else if (ret == EBUSY) {
103
- return false;
104
- } else {
105
- throw boost::thread_resource_error(ret, "Cannot lock spin lock");
106
- }
107
- }
108
- };
109
-
110
- } // namespace oxt
111
-