pitchfork 0.15.0 → 0.16.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a36b331190b5554261852d4a7da0f2e074723cdd1d7ad33a2274a0a532f7ea46
4
- data.tar.gz: bb8ade8d07f6669d1f1e1d55500951d7a27057bf03aa7043caa55dfd8813728b
3
+ metadata.gz: 96240978a658c76297ea22353c5851d80bee9f033a74420b025d9941e32476be
4
+ data.tar.gz: fb90757e6e6a86e31e43bfed1589ed8ecf95c5f3d6f7cbe9802e10f588dd68b8
5
5
  SHA512:
6
- metadata.gz: 3ef8b8ef5217c5b4cc6a63313151ef2d5c1cb823e25caa99f851def3a24e2ad62527db30c06102acea7cdf0638f9627668b931135a093d31ea99fe30c5ae141c
7
- data.tar.gz: 5b92506d1725596b4fb772dd4d0ebe850daf574787d94573083bf0dc3e3e245d5cbde07c7bc7fb85ceb936e33c01c9a71b44aa25c8752b7c4ca325af80ab1957
6
+ metadata.gz: bcfffa4d9e8cb3e92c3dbd89d5a3c32577e5170a039d0e3fd71d5b57b408c6d2cadaf2bb42009cc14714de75b60c42fe3e0273d01bf8f9d49777e09f4d137e2a
7
+ data.tar.gz: d663cbd0e73221ab8dff5dafb2696293cb2552d2026ae6faa0a4c4d28c61ae672d6745c1de5b52baaa5062c4d08ed2d0945ac0986e05cc20e62f713bb8fda84a
data/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # Unreleased
2
2
 
3
+ # 0.16.0
4
+
5
+ - Use `exit!` for exiting the middle process when forking a new worker or mold.
6
+ This skips `at_exit` and finalizer hooks, which shouldn't be needed.
7
+
3
8
  # 0.15.0
4
9
 
5
10
  - Encode pure ASCII strings in Rack env as UTF-8, as allowed by the rack spec.
@@ -1173,9 +1173,8 @@ module Pitchfork
1173
1173
  w.close
1174
1174
  # We need to wait(2) so that the middle process doesn't end up a zombie.
1175
1175
  # The process only call fork again an exit so it should be pretty fast.
1176
- # However it might need to execute some `Process._fork` or `at_exit` callbacks,
1177
- # as well as Ruby's cleanup procedure to run finalizers etc, and there is a risk
1178
- # of deadlock.
1176
+ # However it might need to execute some `Process._fork` callbacks,
1177
+ # so there is a risk of deadlock.
1179
1178
  # So in case it takes more than 5 seconds to exit, we kill it.
1180
1179
  # TODO: rather than to busy loop here, we handle it in the worker/mold loop
1181
1180
  process_wait_with_timeout(middle_pid, FORK_TIMEOUT)
@@ -1196,7 +1195,12 @@ module Pitchfork
1196
1195
  end
1197
1196
  w.puts(pid)
1198
1197
  w.close
1199
- exit
1198
+
1199
+ # We use exit! to skip `at_exit` and finalizers.
1200
+ # These will be ran when both the parent and child exit, this middle process
1201
+ # is just an implementation detail and running these hooks here is more likely
1202
+ # to cause issues than being actually needed.
1203
+ exit!
1200
1204
  end
1201
1205
  else
1202
1206
  Pitchfork.clean_fork(&block)
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Pitchfork
4
- VERSION = "0.15.0"
4
+ VERSION = "0.16.0"
5
5
  module Const
6
6
  UNICORN_VERSION = '6.1.0'
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pitchfork
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.15.0
4
+ version: 0.16.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jean Boussier
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-07-24 00:00:00.000000000 Z
11
+ date: 2024-07-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rack