LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 08-07-2003, 06:08 PM   #1
AndreasA
LQ Newbie
 
Registered: Aug 2003
Location: Sweden
Posts: 4

Rep: Reputation: 0
Question 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
 
Old 08-11-2003, 05:22 AM   #2
shishir
Member
 
Registered: Jul 2003
Location: bangalore . india
Distribution: openSUSE 10.3
Posts: 251

Rep: Reputation: 33
a code snippet would be a great help...
thanks
 
Old 08-11-2003, 02:48 PM   #3
AndreasA
LQ Newbie
 
Registered: Aug 2003
Location: Sweden
Posts: 4

Original Poster
Rep: Reputation: 0
I managed to solve the problem. It was just a small typo of mine, and didn't have anything to do with pthreads at all...
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
POSIX threads - pthread_cond_timedwait iklinux Programming 5 09-26-2005 10:33 AM
About POSIX threads Ephracis Programming 1 12-03-2004 06:33 AM
Signal Handling in Threads[POSIX] anoop_cv Programming 1 11-02-2004 02:00 AM
enable pthreads? (posix threads) cpluspaul Slackware 5 06-29-2004 05:56 AM
a ./configure doesnt see any working posix threads RokOne Linux - Software 0 04-06-2004 08:06 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 01:57 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration