I am running a VMWare 15 Virtual Machine under Windows 10 on a laptop to create an Ubuntu 18.04.3 64-bit environment wherein the Eclipse IDE v2019-09 R (4.13.0) is set-up to create a C/C++ project that interacts with the user via the gnome-terminal. I am using Linenoise to implement a command-line interface. It uses the 'stdlib.c' function 'read()' to continuously 'poll' STDIN for characters and provide line editing. All is working fine when I run the application from within a gnome-terminal. However, when I launch my program using the Eclipse Debug View, I can see the output from the program in the console pane (STDOUT) just fine - but input from the 'console' pane is 'wonky'. After many gyrations, I have found that it CAN work if I type 31 characters (anything) 'before' the desired cli command and then hit ENTER. Clearly, Eclipse is buffering characters and only making them available to my application after '\n' (ENTER) is received (this was expected), but I don't know what's up with the 31 leading characters that are required in order for my code to 'see' the command correctly.
Is anyone familiar with this behavior and how to manage it ?