Home Download Buy Blog Forum Support

Newbie question - how do I kill the console process

Newbie question - how do I kill the console process

Postby joelhoward0 on Wed Jan 18, 2012 1:37 pm

I'm running Sublime Text 2 on Windows, and set up a build system to run a javascript file using Node - just "node $file". This works great, and the console shows Node's console messages.

My question is, how do I kill this process? Either a command or something I can run from within the build system would be fine. Ideally, I'd like the build system to find and kill the previous Node process if it exists, then launch my new one. I'd be happy just to be able to find/kill this process at all, though - and I'm completely new to Python.

Thanks!
joelhoward0
 
Posts: 1
Joined: Wed Jan 18, 2012 1:32 pm

Re: Newbie question - how do I kill the console process

Postby guillermooo on Wed Jan 18, 2012 2:01 pm

You can create a new build system that will not supress GUIs on Windows. The default build system's command is implemented in Packages/Default/exec.py.

* You can copy that to a new file (e. g., Packages/User/my_exec.py),
* rename the exec command (class) inside that file (e. g. MyExecCommand),
* remove the code that causes new processes to hide their window in MyExecCommand, and then
* use the target element in a .sublime-build file ("target": "my_exec") to use your new command instead of the default one.

For the last step, you can also reuse the Python.sublime-build file found in the Python package and simply add the "target" element.

More info here:

http://sublimetext.info/docs/en/referen ... stems.html
guillermooo
 
Posts: 729
Joined: Thu Jul 23, 2009 9:06 am

Re: Newbie question - how do I kill the console process

Postby jps on Wed Jan 18, 2012 2:08 pm

Also, the Tools/Cancel Build menu item may do what you want
jps
Site Admin
 
Posts: 3077
Joined: Wed Mar 19, 2008 12:33 pm


Return to Technical Support

Who is online

Users browsing this forum: Exabot [Bot], Yahoo [Bot] and 34 guests