Current situation: When an application/script has been started as a background process from a terminal and is providing output to the console (i.e. to STDOUT, thus no output redirection), when I type something in the terminal, and the running process outputs something to the terminal as well at the same moment, the process' output gets "appended" to whatever I was typing at that moment and thus visually the input and output are garbled together.
Desired result: I wonder if it's possible to have the "so far typed" input jump on the next line whenever the background process displays its output on the terminal (i.e. have the input text always displayed on the last line automatically, separately from the ongoing output).
Basically I'm looking for a way to achieve the same results as the "logging synchronous" command allows in IOS on Cisco devices (better exemplified here) which, once enabled, takes whatever you typed so far and puts it on a new line (always the last one) whenever there is any "system-related" output displayed during your typing.
Additional stuff: I know that even though visually the input and output text are mixed together, if I continue typing my command all the way and press Enter it will execute fine, it's just rather hard to figure out exactly what you typed when the output catches you unawares.
I'm on Debian Jessie with Gnome so I'm using Bash with the default Gnome Terminal but the same behavior exhibits when using a virtual console (e.g after CTRL+ALT+F1).
I'm not sure if there is some very easy, well-known and obvious way to do it that I'm missing but I've been searching for the better part of last hour to no avail, so I apologize if this is a no-brainer.
Or is this feature (if it exists at all) dependent on the terminal application used?
Thanks for any input.