Skip to content
Snippets Groups Projects
  • Nadav Har'El's avatar
    cf74861e
    Default console to cooked mode, not raw mode. · cf74861e
    Nadav Har'El authored
    Until now, OSV's console defaulted to raw mode, to make the CLI
    happy. The problem is that on Linux, applications expect to be
    run in cooked mode, so if we ever run a simple application that
    tries to read user input, it can be confused.
    
    This patch makes OSV console default to cooked mode, and the
    CLI switch to raw mode before reading an input line - and reset
    to the default mode just before running the user's command.
    
    Unfortunately, we had to resort to adding a JNI class "Stty",
    since Java has no builtin support for the ioctls required for
    changing the tty settings.
    cf74861e
    History
    Default console to cooked mode, not raw mode.
    Nadav Har'El authored
    Until now, OSV's console defaulted to raw mode, to make the CLI
    happy. The problem is that on Linux, applications expect to be
    run in cooked mode, so if we ever run a simple application that
    tries to read user input, it can be confused.
    
    This patch makes OSV console default to cooked mode, and the
    CLI switch to raw mode before reading an input line - and reset
    to the default mode just before running the user's command.
    
    Unfortunately, we had to resort to adding a JNI class "Stty",
    since Java has no builtin support for the ioctls required for
    changing the tty settings.