-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
nsqd/nsqlookupd: support running as windows service #718
Conversation
this is beautiful |
} | ||
|
||
signalChan := make(chan os.Signal, 1) | ||
signal.Notify(signalChan, syscall.SIGINT, syscall.SIGTERM) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's fine for now, but perhaps users of go-svc
want to specify what signals they want to handle? Right now it's hardcoded https://github.com/judwhite/go-svc/blob/master/svc/svc_other.go#L19
I tried running
|
👍 |
I've seen that test flake out in travis, too. It's probably time dependent :( re: |
Indeed, OS X / FreeBSD
Less ugly linux-only variants, if you're curious (the former does something slightly different on OS X, and the latter doesn't work on OS X):
|
@ploxiln to the rescue |
@mreiferson I'm using If you want to build with older versions of Go I think adding |
hmmm, was thinking about building the next release with Go 1.6 but that might be a little aggressive. |
@judwhite just tested I'll open a separate PR for those updates + the flakey test, thanks! |
nsqd/nsqlookupd: support running as windows service
Tried out the official release on Windows, only thing is the binaries need to have a |
This approach expunges the
main.go
andmain_windows.go
files, keeping only the originalnsqd.go
andnsqlookupd.go
which can be built on all platforms.The
// +build
responsibility is moved to thejackfan.us.kg/judwhite/go-svc/svc
package. This package exposes two interfaces and a singleRun
function. Replaces #676.