Sublime Forum

Event for quitting sublime?

#1

I start a Java daemon for my package and I’d like to kill it when Sublime (ST3) quits. I could not find a destructor or hook or something similar what I could use. Any advice?

I use `proc = subprocess.Popen([“java”,"-jar", …]) to run my Java program.

Thanks
Anhil

0 Likes

#2

Hi,

I was searching for something similar, too - but haven’t found any hook or event either.

0 Likes

#3

currently there is no event fired when ST quits, you can vote for it here:


(although you could hook into the File -> Exit/Quit menu item I guess)

to solve the concrete issue, maybe the process you spawn can be automatically killed when it’s parent process (plugin_host) quits?

0 Likes

#4

Hello @kingkeith, thanks for your answer. I’ve upvoted the feature request.

In my case I don’t have access to the Java program, so I probably need to write some intermediate wrapper code, but this would be possible.

Thanks!

0 Likes