I write a small program like following:
1, firstly create a process waiting for keyboard input commands(via getchar()).
2, secondly create a thread in the process waiting on a message queue.
each time after the thread receive a message, it can handle the message but cannot print the log message(via printf) to screen . After I press "Enter" button, the log message will be displayed. why?
who meet such interesting issues before?
thanks in advance.