-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Win32 Service API and SERVICE_CONTROL_SHUTDOWN #258
Conversation
SERVICE_CONTROL_SHUTDOWN is used from the ntservice contrib module's own copy of Winsvc, so not having it in core blocks any plans to decommission that ntservice stuff.
ntservice had an Advapi32 with some methods and structures which weren't in the main platform one. These were copied over verbatim, though I noticed some potentially questionable things while doing so, which should probably be fixed in following commits if they are deemed to matter.
Can you merge this from upstream, please. |
Also, do update CHANGELOG, thx. |
I'll update the changelog but I don't know what you mean by the other thing. |
See it says that this cannot be automatically merged here?
|
@@ -9,6 +9,7 @@ Features | |||
* Use predictable names for CPU arch prefix (namely x86, x86-64); names correspond to OSGI processor values - [@twall](https://github.com/twall). | |||
* Avoid superfluous Structure memory allocation from native - [@twall](https://github.com/twall). | |||
* Added `Library.OPTION_CLASSLOADER`, which enables loading native libraries from any class loader (including JNA's native library). This enables parallel dependencies on JNA (e.g. within a tomcat deployment without having to include JNA in the app server environment) - [@twall](https://github.com/twall). | |||
* Copied Win32 service-related code from `ntservice` contrib module to `platform` - [@trejkaz](https://github.com/trejkaz) |
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.
Missing a dot at the end of this line (it's a sentence).
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.
(a) It doesn't read like one.
(b) The period goes inside the parentheses in that situation (that's called Skitt's Law.)
Merged from upstream. Even though I thought I had already pulled all changes before I started, I apparently hadn't... Since the changelog line conflicted too, I put the period on the end, while chuckling about the irony that your own committers aren't doing it (see the few lines around mine.) |
Thanks. This looks good, but the service functions need unit tests (we keep full coverage in platform.win32). I'm happy to write those, but it will have to wait some. |
Bump. I didn't get to this yet. Please don't hesitate to update with tests. |
The ntservice poject contained additional definitions for windows service related functionality. Unittests are added in the form of a sample service implementation, that is installed/uninstalled and invoked. com.sun.jna.platform.win32.Advapi32: - StartServiceCtrlDispatcher - RegisterServiceCtrlHandler - RegisterServiceCtrlHandlerEx - SetServiceStatus - CreateService - DeleteService com.sun.jna.platform.win32.Winsvc: - Handler - HandlerEx - SERVICE_MAIN_FUNCTION - SERVICE_TABLE_ENTRY - SERVICE_DESCRIPTION - SERVICE_STATUS_HANDLE Closes: java-native-access#821 Closes: java-native-access#258
The ntservice poject contained additional definitions for windows service related functionality. Unittests are added in the form of a sample service implementation, that is installed/uninstalled and invoked. com.sun.jna.platform.win32.Advapi32: - StartServiceCtrlDispatcher - RegisterServiceCtrlHandler - RegisterServiceCtrlHandlerEx - SetServiceStatus - CreateService - DeleteService com.sun.jna.platform.win32.Winsvc: - Handler - HandlerEx - SERVICE_MAIN_FUNCTION - SERVICE_TABLE_ENTRY - SERVICE_DESCRIPTION - SERVICE_STATUS_HANDLE Closes: java-native-access#821 Closes: java-native-access#258
…ative-access#258) Motivation: Sometimes a user may want to use a custom fork of either quiche or boringssl but for this the pom.xml needs to be adjusted. We should just allow to override the repository urls. Modifications: Allow to override the repository urls by using -D ... Result: Easier to use own forks of quiche or boringssl
SERVICE_CONTROL_SHUTDOWN is used from the ntservice contrib module's own copy of Winsvc, so not having it in contrib/platform blocks any plans to decommission that ntservice stuff.
I also moved out Advapi32. As far as I know, this is everything in Win32Service which wasn't already in contrib/platform, so it should be possible to remove the JNA interface stuff from contrib/ntservice now.