Commit 7116697
committed
fix(child_process): fix inverted break condition in close method
In the close method's wait-for-exit loop, the condition
'break if living_process_exist' was inverted. It should be
'break unless living_process_exist'.
The current code breaks out of the loop as soon as it finds living
processes, skipping the wait for them to actually terminate. This
allows child processes to become orphaned or zombie processes during
shutdown, leaking resources held by those processes.
The shutdown method at line 142 correctly implements this pattern:
'if process_exists: sleep; else: break'.
Signed-off-by: Akanksha Trehun <akankshatrehun@gmail.com>1 parent f380d99 commit 7116697
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
191 | 191 | | |
192 | 192 | | |
193 | 193 | | |
194 | | - | |
| 194 | + | |
195 | 195 | | |
196 | 196 | | |
197 | 197 | | |
| |||
0 commit comments