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
Labels
FeatureRequest FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@pytimer
Copy link

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

@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 commented May 22, 2018

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

@bcmills bcmills added NeedsFix The path to resolution is known, but the work has not been done. FeatureRequest labels May 22, 2018
@gopherbot
Copy link

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

@pytimer
Copy link
Author

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

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 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 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

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.
Labels
FeatureRequest FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Projects
None yet
Development

No branches or pull requests

4 participants