diff options
author | Valery Piashchynski <[email protected]> | 2021-11-23 19:02:45 +0300 |
---|---|---|
committer | GitHub <[email protected]> | 2021-11-23 19:02:45 +0300 |
commit | 6c5e3ab6c01d31caa2d14930c188bae697c5cd48 (patch) | |
tree | b93ba751fdfd343b4f181caa9635f4934e495d59 /pool/static_pool.go | |
parent | ecdcee628744e7371eda50ab6f1d3c7c13e8d7c9 (diff) | |
parent | da6d9b3d535196074345c481323e07ca5d09a8c5 (diff) |
[#862]: bug(pool, debug mode): zombie processes when the `pool.debug` mode is usedv2.6.0-beta.1
Diffstat (limited to 'pool/static_pool.go')
-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() |