KaiSong-UK opened a new pull request, #18445: URL: https://github.com/apache/dolphinscheduler/pull/18445
## Purpose Fix issue #16789: When stopping a Flink task, the worker node reports an error and fails to send the kill signal. ## Root Cause In `ProcessUtils.kill()`, the `getPidList()` method (which internally runs `pstree -p <pid>`) is called without checking whether the process is still alive. If the process has already exited naturally, `pstree` throws an exception, causing the entire kill operation to fail and return false. ## Fix Add an `isProcessAlive()` guard before calling `getPidList()`. If the process has already exited, return true immediately since the process is effectively "killed". close #16789 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
