Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix process kill on Mac OS X Mavericks #11

Merged
merged 1 commit into from
Oct 21, 2014
Merged

Fix process kill on Mac OS X Mavericks #11

merged 1 commit into from
Oct 21, 2014

Conversation

Aigeruth
Copy link
Contributor

The problem: guard-go gets the pid of the go run command and not the pid of the running application. It sends the KILL signal to the go run process and exits, but the child process remains running.

The solution: change the application starting process to go build + ./binary.

Host: Mac OS X Mavericks

$ go version
go version go1.3 darwin/amd64

This pull request is based on #10.

@vcastellm
Copy link
Owner

I'm not sure if I like this solution, did you tested it?

@Aigeruth
Copy link
Contributor Author

Yes, I tested it and it works for me. I use it for a go-restful project. But I agree on that it is not the most beautiful solution.

As I see, #8 can be related to this PR.

@@ -46,9 +46,10 @@ def run_go_command!
@proc = ChildProcess.build(@options[:cmd], "test")
else
if @options[:build_only]
@proc = ChildProcess.build(@options[:cmd], "build")
@proc = ChildProcess.build options[:cmd], "build", @options[:server]

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you mean to remove that @ from the first options?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are right. Thanks!

@Aigeruth
Copy link
Contributor Author

I've updated this PR.

vcastellm pushed a commit that referenced this pull request Oct 21, 2014
Fix process kill on Mac OS X Mavericks
@vcastellm vcastellm merged commit cce04f3 into vcastellm:master Oct 21, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants