Home Download Buy Blog Forum Support

Kill previous process when building

Kill previous process when building

Postby Vectorian on Sat Apr 07, 2012 9:44 am

I've just started using Sublime and love the experience so far, but for development, the fact that I need to manually kill the process after each time running a build (-B) is dreadful.

I tried making a custom build script like this:
Code: Select all
   "cmd": [ "kill `ps -ef | grep $file_name | grep -v grep | awk '{print $2}'` || true && python3", "$file"],
   "selector": "main.py",
   "path": "/usr/local/bin"

which did not work out as I wanted it to, is there a simple way to do it? Googling turned up nothing of use.
Posts: 1
Joined: Sat Apr 07, 2012 9:39 am

Re: Kill previous process when building

Postby jankuca on Mon Apr 09, 2012 6:37 pm

I am also interested in this issue.
I would like to run my node.js apps via the build system but I'm getting EADDRINUSE because the previous process is not terminated.

Thanks in advance for any help.
Posts: 6
Joined: Sat Apr 16, 2011 12:56 pm
Location: Prague, Czech Republic

Re: Kill previous process when building

Postby jchannon on Wed Oct 10, 2012 7:55 am

I'm interested in this too.

I tried the below but it kills all the instances just as they start which is odd as its the first command to execute.
Code: Select all
      "name": "NodeF1Build",
      "shell": true,
      "cmd": ["killall node & nodemon --debug $project_path/app.js & node-inspector"],
         "file_regex": "^[ ]*File \"(...*?)\", line ([0-9]*)",
         "selector": "source.js"

Posts: 18
Joined: Sun Oct 02, 2011 4:09 pm

Return to Technical Support

Who is online

Users browsing this forum: No registered users and 22 guests