SetInformationJobObject在JVM 1.8.x中无法正常工作 [英] SetInformationJobObject not working inside JVM 1.8.x
问题描述
我在stackoverflow中创建了这个问题(带有一个功能示例),试图找出发生了什么:
I created this question (with a functional example) in stackoverflow to try to find out what is happening:
https://stackoverflow.com/questions/50498555/ jna-in-windows-auto-terminate-child-processes-using-windows-jobs
https://stackoverflow.com/questions/50498555/jna-in-windows-auto-terminate-child-processes-using-windows-jobs
在我的java应用程序中,我正在尝试创建一个Job(CreateJobObject)并设置一个扩展limit(SetInformationJobObject)to JOB_OBJECT_LIMIT_KILL_ON_JOB_CLOSE。
In my java application, I'm trying to create a Job (CreateJobObject) and set a extended limit (SetInformationJobObject) to JOB_OBJECT_LIMIT_KILL_ON_JOB_CLOSE.
当我调用SetInformationJobObject时,它结果为TRUE,但作业仍然没有设置限制。
When I call the SetInformationJobObject it results TRUE but the job continues without limits setted.
有人可以帮助我吗?
推荐答案
解决,请参阅https://stackoverflow.com/questions / 50498555 / jna-in-windows-auto-terminate-child-processes-using-windows-jobs
Solved, see https://stackoverflow.com/questions/50498555/jna-in-windows-auto-terminate-child-processes-using-windows-jobs
使用JNA API失败了。我没有正确初始化限制结构。
That was a fail using the JNA API. I wasn't initializing correctly the limit structures.
抱歉,我的错。
这篇关于SetInformationJobObject在JVM 1.8.x中无法正常工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!