diff options
author | Valery Piashchynski <[email protected]> | 2021-11-23 18:31:12 +0300 |
---|---|---|
committer | Valery Piashchynski <[email protected]> | 2021-11-23 18:31:12 +0300 |
commit | 57acf5cf06a4e98e65c539bb243e0e293a2e62fd (patch) | |
tree | fcbe8f792871f317df209798903fa6bd59988aef /pool | |
parent | ecdcee628744e7371eda50ab6f1d3c7c13e8d7c9 (diff) |
Update deps
Read process exit status to prevent zombie processes
Signed-off-by: Valery Piashchynski <[email protected]>
Diffstat (limited to 'pool')
-rwxr-xr-x | pool/static_pool.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/pool/static_pool.go b/pool/static_pool.go index 4ff57173..9897b9e7 100755 --- a/pool/static_pool.go +++ b/pool/static_pool.go @@ -312,6 +312,11 @@ func (sp *StaticPool) execDebug(p *payload.Payload) (*payload.Payload, error) { return nil, err } + go func() { + // read the exit status to prevent process to be a zombie + _ = sw.Wait() + }() + // destroy the worker sw.State().Set(worker.StateDestroyed) err = sw.Kill() |