async-container 0.34.4 → 0.34.5

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: 45d1096677e99abf4e408324f81089d3a09dffe06faec9802505f0982a286c9c
4
- data.tar.gz: 9297103dfdd8c2181881a7cc6639afcc4d16ea3acfcd4f6074429c6a06c229f5
3
+ metadata.gz: 277b861e3816090ba6221ede785567b38c4e4f379c191bdbf96134245b6bd618
4
+ data.tar.gz: 6c173b66aa334bd493f946027437f3947fd4b3c85f4b05e4c80bccb0bfe2dc72
5
5
  SHA512:
6
- metadata.gz: c1e6e6c690ab46402878c54a91565decb35a5cfbb6f10b49e393949fafe2cba33da780bbdbb9a2b01dd9ad80487a16e83c7188667f22ee6e8c8696008a0e8ce2
7
- data.tar.gz: fce543a64ebb908baa70bd0c5912b92b1395e3a99fc257cc3280cd3527f23215001e1aebfa50946f6fd956011f981b84e92a8ced7d4079e063fa9be542d1e8c6
6
+ metadata.gz: 18613e589fd52228a3d4b99c53ad2e7a493abf203e9b310c94bb576db5b78a424da16bd96be5ee4faa6cfa11ed737388fba1d87fe63e2a182afd9f3bf193d954
7
+ data.tar.gz: fef669494da3b2b43c0a4a4ec7b43394c059842e0522279816a7e5d2fa1731bbaafd11e66f792672e93c238589e05874b90ab22fd6af0a9aca02f16a9f5f3cfe
checksums.yaml.gz.sig CHANGED
@@ -1,6 +1,3 @@
1
- Ih�O��11���o׈�� /ֹ�?�'L�ܛ5��zNۧ0c��v>q��(�vGV�&F��e�L����ʘu�E���P !ġ�l}ѻ��TaRo9a��������D��)p��?�
2
- e�¼���
3
- m�4�kR�N
4
- �.����J!��Ɲ�L3_C�� V����J�����uF���.���"'}J�G�|��cQk�䬽@^ ��0-()�>&��1�O^��3�����+���)�,����JGAJ�4�g�p ���5.���rc��-�I9Z�-��r�x�c靔��[��� ���H��
5
- ��3�Ҵ�^���
6
- �Jh\,��(S�ɸ!��l���|��r�K�V�������
1
+ ���c����y��nIuN��?��KZm֍��I�2�qP�P�Ο�D+���
2
+ ��O��[�4�"�ɿw� ��'fR8�V'��Q;u�K��xy�w� Yɥ�׋b�N��h����6R���s�֨����-�g�(1�o?�d�e����=$ OYv�-�7縦W8�f^�񘰀eI��ư9�H�3�A|̂���� �]�W�ь�]����i�6���\�X�䶎�.֤�Ίʫ h�)F|����N����^7���U{�7>K���M�VI �o�C�/�%�kn�@�i�vכ&R|�����~�3
3
+ ��/�qu���Yi�^�ֹ�.��+qbRRw�\�
@@ -80,13 +80,15 @@ module Async
80
80
  # This method replaces the child process with the new executable, thus this method never returns.
81
81
  #
82
82
  # @parameter arguments [Array] The arguments to pass to the new process.
83
- # @parameter ready [Boolean] If true, informs the parent process that the child is ready. Otherwise, the child process will need to use a notification protocol to inform the parent process that it is ready.
83
+ # @parameter ready [Boolean] If true, informs the parent process that the child is ready before exec. The notification pipe will still be passed to the exec'd process to prevent premature termination.
84
84
  # @parameter options [Hash] Additional options to pass to {::Process.exec}.
85
85
  def exec(*arguments, ready: true, **options)
86
+ # Always set up the notification pipe to be inherited by the exec'd process.
87
+ # This prevents the pipe from closing, which would trigger hang prevention and SIGKILL.
88
+ self.before_spawn(arguments, options)
89
+
86
90
  if ready
87
91
  self.ready!(status: "(exec)")
88
- else
89
- self.before_spawn(arguments, options)
90
92
  end
91
93
 
92
94
  ::Process.exec(*arguments, **options)
@@ -91,10 +91,11 @@ module Async
91
91
  # Execute a child process using {::Process.spawn}. In order to simulate {::Process.exec}, an {Exit} instance is raised to propagage exit status.
92
92
  # This creates the illusion that this method does not return (normally).
93
93
  def exec(*arguments, ready: true, **options)
94
+ # Always set up the notification pipe to be inherited by the spawned process.
95
+ self.before_spawn(arguments, options)
96
+
94
97
  if ready
95
98
  self.ready!(status: "(spawn)")
96
- else
97
- self.before_spawn(arguments, options)
98
99
  end
99
100
 
100
101
  begin
@@ -5,6 +5,6 @@
5
5
 
6
6
  module Async
7
7
  module Container
8
- VERSION = "0.34.4"
8
+ VERSION = "0.34.5"
9
9
  end
10
10
  end
data/readme.md CHANGED
@@ -28,6 +28,10 @@ Please see the [project documentation](https://socketry.github.io/async-containe
28
28
 
29
29
  Please see the [project releases](https://socketry.github.io/async-container/releases/index) for all releases.
30
30
 
31
+ ### v0.34.5
32
+
33
+ - **Fixed**: `instance.exec` with `ready: true` no longer causes premature termination. The notification pipe is now always passed to the exec'd process.
34
+
31
35
  ### v0.34.4
32
36
 
33
37
  - Add missing `bake` and `context` files to the release.
@@ -68,10 +72,6 @@ Please see the [project releases](https://socketry.github.io/async-container/rel
68
72
  - `SIGTERM` is now graceful, the same as `SIGINT`, for better compatibility with Kubernetes and systemd.
69
73
  - `ASYNC_CONTAINER_INTERRUPT_TIMEOUT` and `ASYNC_CONTAINER_TERMINATE_TIMEOUT` are removed and replaced by `ASYNC_CONTAINER_GRACEFUL_TIMEOUT`.
70
74
 
71
- ### v0.29.0
72
-
73
- - Introduce `Client#healthy!` for sending health check messages.
74
-
75
75
  ## Contributing
76
76
 
77
77
  We welcome contributions to this project.
data/releases.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Releases
2
2
 
3
+ ## v0.34.5
4
+
5
+ - **Fixed**: `instance.exec` with `ready: true` no longer causes premature termination. The notification pipe is now always passed to the exec'd process.
6
+
3
7
  ## v0.34.4
4
8
 
5
9
  - Add missing `bake` and `context` files to the release.
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: async-container
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.34.4
4
+ version: 0.34.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
metadata.gz.sig CHANGED
Binary file