You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Successfully reproduced against the latest version of NW.js?
Issue
I'm reporting two issues that are somewhat related to each other when trying to intercept the termination of NW.js apps. I noticed the second issue while trying to debug the first one.
When calling process.removeAllListeners() at the beginning of the application code (e.g. for being able to reset global application state in-between application window reloads) and then attaching an event listener on the process for a SIGTERM signal for example, sending the signal to the running process will cause NW.js to crash if --disable-features=nw2 is set. If --disable-features=nw2 is not set, then the event listener gets ignored, which is bad. https://nodejs.org/api/process.html#signal-events
My application had to set --disable-features=nw2 twice in the past because of various issues with the new nw2 implementation (1, 2), and so far I haven't reverted this (again). I will need to test the latest releases and see if those issues still occur, but the issues are fixed, I will upgrade to nw2, so the issue shouldn't affect my application. However, I felt like this issue is still worth reporting, as it's a regression that has been introduced in 0.68.
The process event listener issue on the other hand looks like a NodeJS related issue (decided to test this after proof-reading my post). NW.js shouldn't crash though if --disable-features=nw2 is set.