RFR: 8263729: [test] Extend time to wait before destroying child in ProcssBuilder Basic test
Thomas Stuefe
stuefe at openjdk.java.net
Thu Mar 18 14:33:51 UTC 2021
On Thu, 18 Mar 2021 13:41:01 GMT, Roger Riggs <rriggs at openjdk.org> wrote:
> The test expects there to be zero output from the child (and it doesn't matter what state the child is in).
> Can the logging from the VM be disabled or re-directed?
Not to the extend that it would be guaranteed never to happen. Even if we control all output in the hotspot, there are other libraries. E.g. glibc writes a lengthy report to stderr in case of a heap corruption, which I believe does not result in a hs-err file.
One simple solution, simpler than using two threads, could be to use ProcessBuilder::redirectError(Redirect.INHERIT) if reading stdout resp. ProcessBuilder::redirectOutput(Redirect.INHERIT) if reading stderr. One line, takes care of the stream you don't read does not block, and, we can see the child output in the parent stdout/err.
-------------
PR: https://git.openjdk.java.net/jdk/pull/3049
More information about the core-libs-dev
mailing list