For Programmers: Free Programming Magazines  


Home > Archive > Unix Programming > July 2007 > Threads with pipe and select?









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Threads with pipe and select?
willil

2007-07-13, 9:14 am

Hi. I just found this site and thought I'd ask about a problem I'm trying to figure out.

I have two threads that are connected by a pipe. Thread A can write to the pipe and Thread B can read the data from the pipe. My problem is that when I use select() in Thread B to detect if the pipe is read ready, the select never returns. I'm doing FD_SET(pipe[0], &readfds) to set up for the select. (This code already works with actual separate processes) Is there something special I need to do or don't know about here?

Thanks,
Willi
willil

2007-07-13, 9:16 am

Hmmm.... Interesting spacing in that formatting...javascript:smilie('')
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2010 codecomments.com