RFR: JDK-8292351: tty should always live

Thomas Stuefe stuefe at openjdk.org
Tue Aug 16 07:20:20 UTC 2022


On Tue, 16 Aug 2022 05:46:30 GMT, Christoph Langer <clanger at openjdk.org> wrote:

> Would it be possible to redirect to some dummy file instead of stdout? I mean if it is just to avoid crashes and nobody cares about lost logs?

Unfortunately, that does not help. 

We very much want to see the output (see e.g. Discussion https://mail.openjdk.org/pipermail/hotspot-runtime-dev/2022-August/056826.html, where NMT detected a heap corruption but was unable to print out a meaningful report since tty was NULL and it crashed).

And people could object to random files popping up as well. Where would you write them?

No, the more I think about this the more I am convinced that printing to stderr is the right thing to do. That is what, for instance, the C-Runtime does if it detects a stack corruption. It is the typical Unix way too, so it does not violate the principle of least surprise.

-------------

PR: https://git.openjdk.org/jdk/pull/9874


More information about the hotspot-dev mailing list