Search code examples
gruntjsgrunt-contrib-watchlibsass

Grunt Task - freeing up the port


I setup this.

http://www.zell-weekeat.com/grunt-sass-with-susy/

It works fine for one run then, if I exit out of the sass watch I can't free up the port.

Fatal error: Port 35729 is already in use by another process.

Then

sudo lsof -i :35729

gives

\COMMAND   PID   USER   FD   TYPE  DEVICE SIZE/OFF NODE NAME
grunt   26305 author   12u  IPv6 7064373      0t0  TCP *:35729 (LISTEN)

How do I get this port to free up


Solution

  • Just for organization sake, as mentioned in comments:

    You should stop a process with Ctrl+C in the terminal.

    Ctrl+Z will keep it running.

    If you need to kill it, find the PID with sudo lsof -i :35729 and then kill -9 PID.