fix systeminformation thread not ending#4155
Conversation
KristjanESPERANTO
left a comment
There was a problem hiding this comment.
Nice solution 👍 Why is this still a draft?
|
it still does not work ... |
|
If you need help with further investigation: How are you reproducing the issue? I'm having trouble seeing it on my end - Worker threads die with the parent process, so no orphans under pm2. |
|
as always within a container. This PR solves the problem where threads are not ending but systeminfo is not displayed ... will try again later or tomorrow. Which setup did you test with pm2 (with this PR or without or both)? |
|
Both, but now I see the issue with the missing output when the config has an error, but no approach to solve it. |
|
I have now an ugly approach to solve it ... |
…without hanging shell
KristjanESPERANTO
left a comment
There was a problem hiding this comment.
I don't think it's that ugly. Since I don't see a better approach I'm okay with this one :)
This was introduced when running systeminformation in an own thread.
If the main thread ends before (e.g. when config has errors) the systeminformation thread never ends.
As this can have side effects under pm2 or docker (because the app never exits) this PR restores the old behavior.