I have a problem about controlling which thread should have preference when reading from standard input. The program main thread have a prompt loop and another thread which enqueue commands. Some commands is supposed to establish a shell and then takeover the standard input/output. But I don't know how to do this properly yet and both threads are trying to read at the same time.
Any tips are welcome.
Any tips are welcome.