Fix Windows Defender status retrieval under Java-25 or later#3994
Conversation
Fixes errors like: ''' Failed to obtain 'WinDefend' service state java.io.IOException: Process timed-out and it was attempted to forcefully terminate it '''
82e6506 to
ac4d0af
Compare
merks
left a comment
There was a problem hiding this comment.
It's not so easy to test without a build, I see zero risk in this producing worse behavior given If the process has already terminated then this method returns immediately with the value {@code true}. So it should exactly deal with the case of it taking a while for isAlive to return false, and in the worst case taking 5 second longer to pop up a failure message...
|
If we merge this today, I can more easily test tomorrow's I-build... |
The check is performed even in a secondary Eclipse, if you remove the
Absolutely agree. And since it runs asynchronously in a job, its almost free. |
In recent Java versions
Process.isAlive()seems to report the termination of a process a little bit later then before, relative to the time when the process output reader is closed, which leads to false errors about process time-out.Fixes errors like:
I cannot yet tell why, because I haven’t investigated the details yet.
CC @merks and @azoitl
Does this also help for