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
This is something that ST just cannot do at the moment and thus leaves plugins mostly struggling to clean up their resources or whatever. Because it's something that can be reused easily and only needs a single guardian process, there should be a centralized solution and sublime_lib provides a good opportunity to do so.
In essence:
Provide an interface that users can call with the path to an executable (script) that will be run once it is detected that ST has been shut down. Also pass provided arguments to the subprocess call.
On the first of such call, spawn a subprocess using the system python that will monitor its parent existence and has a communication channel with the plugin so that more on_exit executables can be added.
Once ST has been closed, run the specified scripts with the respective arguments in parallel.
Optional: Log errors or failed calls in some log file, probably in the cache.
I suppose using standard pipes for communication and declaring ST as having closed when the pipe is broken works, too.