summaryrefslogtreecommitdiff
path: root/pool/static_pool.go
diff options
context:
space:
mode:
authorValery Piashchynski <[email protected]>2021-11-23 19:02:45 +0300
committerGitHub <[email protected]>2021-11-23 19:02:45 +0300
commit6c5e3ab6c01d31caa2d14930c188bae697c5cd48 (patch)
treeb93ba751fdfd343b4f181caa9635f4934e495d59 /pool/static_pool.go
parentecdcee628744e7371eda50ab6f1d3c7c13e8d7c9 (diff)
parentda6d9b3d535196074345c481323e07ca5d09a8c5 (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-xpool/static_pool.go5
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()