X
Xav Xav
Hi,
I am currently working on a console-based app, in which the user
interacts by entering commands from within a prompt (e.g. sort of a
bash-like app).
One thread for the prompt, some others for computation.
I allowed those threads to output to the console, but it leads to a
really not user-friendly behaviour. Example:
prompt: lis <- started to type in the "list" command
Blablabla from Thread1 <- output to $stdin by threads
prompt: <- The prompt is re-displayed, the command
"seems" lost
prompt: list <- Type again the command "list"
Error: lislist: Unknown command
See my problem?
How can I get the exact text line to be displayed after a thread output
its message? Or How can I catch a partially typed input?
I thought of syscalls, but didn't get any results yet.
[Note: Obviously, if I had only input "t" after the thread had
displayed, my command would have been correctly interpreted]
I am currently working on a console-based app, in which the user
interacts by entering commands from within a prompt (e.g. sort of a
bash-like app).
One thread for the prompt, some others for computation.
I allowed those threads to output to the console, but it leads to a
really not user-friendly behaviour. Example:
prompt: lis <- started to type in the "list" command
Blablabla from Thread1 <- output to $stdin by threads
prompt: <- The prompt is re-displayed, the command
"seems" lost
prompt: list <- Type again the command "list"
Error: lislist: Unknown command
See my problem?
How can I get the exact text line to be displayed after a thread output
its message? Or How can I catch a partially typed input?
I thought of syscalls, but didn't get any results yet.
[Note: Obviously, if I had only input "t" after the thread had
displayed, my command would have been correctly interpreted]