wrapper.console_input

Compatibility :3.5.52
Editions :Professional EditionStandard EditionCommunity Edition
Platforms :WindowsMac OSXLinuxIBM AIXFreeBSDHP-UXSolarisIBM z/OSIBM z/Linux

WARNING

DO NOT modify any of these parameters unless you have read this property description. Incorrect settings can cause the Wrapper to fail to operate as expected.

This property allows you to enable or disable the Wrapper's ability to process console input for the JVM.

Possible values are:

  • ENABLED:

    to enable the processing of stdin

  • DISABLED:

    to disable the processing of stdin

  • AUTO:

    to let the Wrapper automatically disable the handling of stdin in cases when there is nothing to read
    (on Windows, AUTO is always resolved to ENABLED).

The default value is "AUTO".


With the value 'AUTO', the Wrapper automatically disables the handling of stdin in the following cases (UNIX only):

  • If the wrapper.daemonize property is set to TRUE. This is done because a Daemon process, by definition, has no place to read from.
  • If there is no terminal in the foreground process group, or if the process group the of the controlling terminal differs from the group of the Wrapper process.
  • If '/dev/null' is redirected to stdin. This is the case for example, when running in a Docker container without TTY.
  • If stdin is connected to a file type that is not for reading.

In all other cases, the handling of stdin will be kept enabled.


AUTO is generally a suitable value, unless you know that your application will never read console input, in which case you can set the property to DISABLED.

Disabling console input will makes any attempts to read from the console to block indefinitely. This is done to prevent certain Java code from thrashing inside a loop while attempting to read. Additionally, it allows for a slight reduction in CPU usage on the Wrapper side.

Some users have reported problems with certain JVMs where an "java.io.IOException: The handle is invalid." error will be thrown when the JVM attempts to read from System.in when hooked up through the Wrapper. Setting wrapper.console_input to DISABLED makes it possible to work around this issue.


Example: (Disable stdin)
wrapper.console_input=DISABLED

Reference: Console