codeskyblue/fswatch

Fail to restart process

clinyong opened this issue · 4 comments

I'm using macaron with fswatch. Sometimes when edit a file, it will cause

[Macaron] listening on 0.0.0.0:8181 (development)
[Macaron] listen tcp 0.0.0.0:8181: bind: address already in use
fswatch >>> [watch] program exited: exit status 1

Seems the old process is not killed successfully.

BTW, this problem does not always happen. But it has already happend many times since I migrate to the new version of fswatch.

Which platform, and go version you use?

Sorry. My platform is Linux and go version is 1.6

$ uname -a
Linux shhl2 3.16.0-30-generic #40~14.04.1-Ubuntu SMP Thu Jan 15 17:43:14 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
$ go version
go version go1.6 linux/amd64

Maybe the best way is change from signal: HUP to signal: KILL

Don't forget to update the fswatch. make sure fswatch -version returns 2.1

Yeah, update to 2.1 can fix this problem. Thanks.