kataras / rizla

:eyes: Rizla builds, runs and monitors your Go Applications with ease. See https://github.com/kataras/iris-cli for Iris users.
MIT License
190 stars 17 forks source link

proc.Release() cause process won't be killed #4

Closed acoshift closed 8 years ago

acoshift commented 8 years ago

I have problem with iris run and found that the process won't be killed when code changed.

$ go version go version go1.7 darwin/amd64

Error (code from iris create without any change)

$ rizla backend/main.go
         _____      _
        |_   _|    (_)
          | |  ____ _  ___
          | | | __|| |/ __|
         _| |_| |  | |\__ \
        |_____|_|  |_||___/ 4.1.1

Sun, 28 Aug 2016 22:37:43 GMT: Running at 127.0.0.1:8080

A change has been detected, reloading now...ready!
listen tcp4 127.0.0.1:8080: bind: address already in use
panic: listen tcp4 127.0.0.1:8080: bind: address already in use

goroutine 1 [running]:
panic(0x632200, 0xc4202aa700)
        /usr/local/Cellar/go/1.7/libexec/src/runtime/panic.go:500 +0x1a1
github.com/iris-contrib/logger.(*Logger).Panic(0xc4202aa5b0, 0x632200, 0xc4202aa700)
        /Users/acoshift/Projects/gopath/src/github.com/iris-contrib/logger/logger.go:125 +0x9e
github.com/kataras/iris.(*Framework).Must(0xc4202514a0, 0xa2ba60, 0xc4203269b0)
        /Users/acoshift/Projects/gopath/src/github.com/kataras/iris/iris.go:374 +0xa1
github.com/kataras/iris.(*Framework).Listen(0xc4202514a0, 0x71558f, 0xe)
        /Users/acoshift/Projects/gopath/src/github.com/kataras/iris/iris.go:460 +0xe9
github.com/kataras/iris.Listen(0x71558f, 0xe)
        /Users/acoshift/Projects/gopath/src/github.com/kataras/iris/iris.go:450 +0x41
main.main()
        /Users/acoshift/Projects/gopath/src/test/backend/main.go:38 +0x250

After I try remove proc.Release() from rizla.go line 261, it fix the problem.

ghost commented 8 years ago

It was working on linux and windows, I don't have mac so I'm heavly trust you and remove the .Release call for OSX