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

x/sys/windows: Get windows service process id #25485

Closed
pytimer opened this issue May 22, 2018 · 8 comments
Closed

x/sys/windows: Get windows service process id #25485

pytimer opened this issue May 22, 2018 · 8 comments

Comments

@pytimer
Copy link

@pytimer pytimer commented May 22, 2018

Please answer these questions before submitting your issue. Thanks!

What version of Go are you using (go version)?

go version go1.10 windows/amd64

Does this issue reproduce with the latest release?

Yes

What operating system and processor architecture are you using (go env)?

go environment

set GOARCH=amd64
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOOS=windows
set GOROOT=C:\Go
set GOTOOLDIR=C:\Go\pkg\tool\windows_amd64

What did you do?

I am call windows api to get the specified name service status, include service process id.

What did you expect to see?

I expected golang/sys/windows package have QueryServiceStatusEx() function, it will return service status include process id.

What did you see instead?

Now golang/sys/windows package only have QueryServiceStatus() function, it not return pid.

So i want to call QueryServiceStatusEx() get service process id, but no function to implement it currently.I am write code to implement in my project, this feature whether need to add golang/sys/windows package?

Thanks for any help! :)

@gopherbot gopherbot added this to the Unreleased milestone May 22, 2018
@alexbrainman
Copy link
Member

@alexbrainman alexbrainman commented May 22, 2018

@pytimer I am OK with adding QueryServiceStatusEx to x/sys/windows package.

Feel free to contribute that change yourself - https://golang.org/doc/contribute.html

If it is too hard, let me know, and I will make the change myself.

Alex

@pytimer
Copy link
Author

@pytimer pytimer commented May 22, 2018

Thank you for your reply.
I will try to do this. if it is hard, i will tell you. :)

@gopherbot
Copy link

@gopherbot gopherbot commented May 23, 2018

Change https://golang.org/cl/114215 mentions this issue: x/sys/windows: add QueryServiceStatusEx() retrieves windows service

@pytimer
Copy link
Author

@pytimer pytimer commented May 23, 2018

@alexbrainman I am already submit PR to fix this issue.

https://go-review.googlesource.com/#/c/sys/+/114215

It is my first submit PR for golang/go, is there a problem with the push operation?
If something wrong, i hope you can point out and i will fix it.

Thanks. :)

@alexbrainman
Copy link
Member

@alexbrainman alexbrainman commented May 23, 2018

It is my first submit PR for golang/go, is there a problem with the push operation?
If something wrong, i hope you can point out and i will fix it.

I just reviewed your CL, it was all fine. Please adjust your CL as per my instructions.

Thank you.

Alex

@pytimer
Copy link
Author

@pytimer pytimer commented May 24, 2018

Thanks. :)

I have some things for now, and i will fix it on this week.
Sorry.

@pytimer
Copy link
Author

@pytimer pytimer commented May 24, 2018

@alexbrainman . I fix my CL according to your and Tobias Klauser instructions.

Please check my CL if you have free time.
https://go-review.googlesource.com/#/c/sys/+/114215

Thanks.

@alexbrainman
Copy link
Member

@alexbrainman alexbrainman commented May 24, 2018

I fix my CL according to your and Tobias Klauser instructions.

Cool.

Please check my CL if you have free time.

Will do.

Alex

@golang golang locked and limited conversation to collaborators May 24, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants
You can’t perform that action at this time.