I'm working on a chat app, I'm using ncurses, I create 3 screens with ncurses, an input screen to type in the input, a message screen to display the messages, and a screen to list all the logged on users. I needed the input to be constantly active, and waiting for input, while having the message and user screens constantly being updated, so I used fork, the parent process handles user input, and the child process loops through constantly checking for new logged in users and new messages. Now everything works great, with one exception, when I have it post from the parent process I have it print it to the message screen as 'You: message'.
Now what's happening is the text that's printed from the parent process (the text the user types in) overlapps the text printed from the child process, my best guess is when it forks it creates two virtual terminals that each have their own set of text.
So far, I've tried making a pipe, and having the parent pipe the text to the child, but to no avail, if anyone has any ideas how I could fix this issue I'd greatly apprecieate it.