I have a problem with POSIX Threads.
I am completely new to pthread programming, so be gentle...
I have written a threaded program with a thread that connects to a server, and constantly waits for information to read and then put it on the screen.
The thing is that it doesn't seem to read anything, though when I connect to the server through for example telnet or nc I get the information.
Out of desperation i put a getchar() call in the main() thread, and when I send a character to stdin it suddenly displays the information.
Why does this happen?
- Andreas
|