[
https://issues.apache.org/jira/browse/NIFI-11542?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Pierre Villard resolved NIFI-11542.
-----------------------------------
Resolution: Feedback Received
Apache NiFi 1.x is no longer maintained and no new release is planned on the
1.x release line. Marking as resolved as part of a cleanup operation. Please
open a new one with an updated description if this is still relevant for NiFi
2.x.
> RunNiFi's process detection and termination does not work on Windows
> --------------------------------------------------------------------
>
> Key: NIFI-11542
> URL: https://issues.apache.org/jira/browse/NIFI-11542
> Project: Apache NiFi
> Issue Type: Bug
> Affects Versions: 1.21.0
> Environment: Windows
> Reporter: Paul Kelly
> Priority: Major
>
> Process detection and termination in
> nifi-bootstrap/src/main/java/org/apache/nifi/bootstrap/RunNiFi.java rely on
> running system commands ({{{}ps{}}} and {{{}kill{}}}) to determine if a
> process is alive and to terminate lingering processes. The commands used do
> not exist on Windows. Therefore, isProcessRunning always returns false and
> killing lingering processes also fails. This can lead to the java.exe
> process sticking around after NiFi is stopped.
> Once Java 11 is the minimum, Java's ProcessHandle could be used instead of
> running system commands, which would allow process detection and termination
> to work on Windows the same way it does on other operating systems. Until
> then, OS detection could be used to run Windows commands on Windows and POSIX
> commands on everything else. For example, {{tasklist}} and {{taskkill}}
> could be used.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)