Multiplexing 'select' sync I/O 
Author Message
 Multiplexing 'select' sync I/O

        Does anyone have an example of source code that would clearly
show to a novice how to use the 'select' function for examining about 8
pipes of spawned child processes?
        I'm having a{*filter*}ens of a time putting these in working order and
your help would greatly be appeciated.

        The example in the man page on the HP is not very fulfilling and
'Stevens' doesn't really examine the function.

Thanks,
Tracy



Tue, 11 Mar 1997 04:08:53 GMT  
 Multiplexing 'select' sync I/O

Quote:
>    Does anyone have an example of source code that would clearly
>show to a novice how to use the 'select' function for examining about 8
>pipes of spawned child processes?
>    I'm having a{*filter*}ens of a time putting these in working order and
>your help would greatly be appeciated.

>    The example in the man page on the HP is not very fulfilling and
>'Stevens' doesn't really examine the function.

>Thanks,
>Tracy

I don't have any source code, but perhaps different wording will suffice.
You decide which descriptors to wait on by including them in the respective
descriptor sets (readfds,  writefds, and exceptfds). The macro FD_SET is used
for this purpose. The descriptor sets must be initialized before they are
used (see FD_ZERO). This is because select() modifies them directly to reflect
which descriptors of those indicated above are ready. You determine which one by
using the macro FD_ISSET. This macro returns non zero if the descriptor in
question was made a member of particular descriptor set or zero if not.

Jeff S.{*filter*}son



Wed, 12 Mar 1997 00:38:26 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. I/O multiplexing with select()

2. Using select() to multiplex client connect()s

3. 'select' statement in SCO

4. creating a 'selected' image

5. Can't sync input and output streams...

6. How Sync. two ListCtrl's

7. HotSync( Palm OS) Vs. Active Sync(Wince)

8. Dynamic loading in different OS's

9. Multitasking OS's

10. Char byte size in multiple os's

11. compilers os's and portability

 

 
Powered by phpBB® Forum Software