We get the exception below when pressing CTRL-C when running the application via Maven that uses a custom Maven plugin. The plug-in uses the jnr.posix.POSIX.kill() function to terminate the running program. But the kill is not implemented for Windows in jnr-posix. Because of this we have to open Process Explorer and manually kill the java process that is left running in the background. The first 50 times this was ok, but it is getting very tiresome.
What will it take to implement the kill method for Windows in jnr.posix?
Exception in thread "Thread-1" java.lang.IllegalStateException: kill is not implemented in jnr-posix
at jnr.posix.util.DefaultPOSIXHandler.unimplementedError(DefaultPOSIXHandler.java:28)
at jnr.posix.WindowsPOSIX.kill(WindowsPOSIX.java:162)
at org.yamcs.maven.JavaProcessBuilder.lambda$start$0(JavaProcessBuilder.java:61)
at java.base/java.lang.Thread.run(Thread.java:834)
For reference: https://github.com/yamcs/yamcs-maven-plugin/blob/2c4d4db96aeeefecd45aa2ba5e5bb646f307a67c/src/main/java/org/yamcs/maven/JavaProcessBuilder.java#L61
We get the exception below when pressing CTRL-C when running the application via Maven that uses a custom Maven plugin. The plug-in uses the jnr.posix.POSIX.kill() function to terminate the running program. But the kill is not implemented for Windows in jnr-posix. Because of this we have to open Process Explorer and manually kill the java process that is left running in the background. The first 50 times this was ok, but it is getting very tiresome.
What will it take to implement the kill method for Windows in jnr.posix?
For reference: https://github.com/yamcs/yamcs-maven-plugin/blob/2c4d4db96aeeefecd45aa2ba5e5bb646f307a67c/src/main/java/org/yamcs/maven/JavaProcessBuilder.java#L61