mirror of
https://github.com/Unitech/pm2.git
synced 2025-12-08 20:35:53 +00:00
Previously, when the pm2 reloadLogs command was running as a non-root user, the process will not release and hangs. The reason for the hang is that the forked process never closes because the object is empty and doesn't contain the expected object. This commit checks if an object exists first, before trying to execute methods on it. Related to: #4781 Co-authored-by: Franck Danard <fdanard@sangoma.com>