dpol1 commented on PR #3532:
URL: https://github.com/apache/tika/pull/3532#issuecomment-6654441896

   Thanks, Tim. The second start-time lookup was redundant: the [JDK 17 
implementation](https://github.com/openjdk/jdk17u/blob/b84391a2df6cf9fff72c1580502dd7b2b1838dd6/src/java.base/unix/native/libjava/ProcessHandleImpl_unix.c#L306-L318)
 checks it before killing . I removed that lookup and the Descendant record in 
87c9980acd, and changed checkCommandWithTimeout to use 
destroyForciblyWithDescendants.
   
   I kept the post-listing isAlive() check because descendant discovery uses 
the parent's PID, which may have been reused, and isAlive() compares the start 
time. I also kept the unknown-start-time filter: the JDK permits killing when 
that information is unavailable. Your bot is right about the trade-off: if the 
parent exits during listing, we discard its descendants. I prefer that risk to 
killing an unrelated process.
   


-- 
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]

Reply via email to