Saeshnikov / Linux-monitoring-utility

MIT License
2 stars 0 forks source link

Defunct processes due to missing Close() for pipe and Wait() for command #101

Closed denis-koptev closed 4 months ago

denis-koptev commented 4 months ago

https://github.com/Saeshnikov/Linux-monitoring-utility/blob/2248699026640f8507e57af57187cdd8568d69c5/prototype/internal/rpmLayer/RPMlayer.go#L48

SInce you open stdout pipe, you need to Close() it once you are done with it. Then you need to Wait() for a command to avoid defuncts/zombies