What happens to stderr/stdout streams after Process#destroy() in Java?
- by Lajos Nagy
Here's my problem. I'd like to have a timeout for a process I start from Java. After the timeout, I'd like to kill the process. So far, so good. Problem is, I want to capture stderr/stdout during both normal execution and after a timeout. What happens if I kill the process with destroy()? Can I retrieve the (partial) stderr/stdout produced so far? Or are they gone?