select() and Exceptional Conditions Pending: What to do?

select() and Exceptional Conditions Pending: What to do?

Post by Eskandar Ensa » Thu, 17 Feb 1994 03:28:50



Hello,

I had a question about dealing with exceptions raised when using select().

I know that the select() call allows you to examine 3 conditions on a set of
file descriptors: (1) ready to be read, (2) ready to be written, and (3) an
exceptional condition is pending.

Here's my situation: I am using select() to decide when to read from a child
process created with fork() and exec(), in order to AVOID BLOCKING when the
pipe to my child process is not ready to be read.  The stdin and stdout of the
child are duplicated via dup2() to a pipe (created using pipe(), of course).
When an exceptional condition is raised on one end of the pipe, it has been my
experience that the child has terminated at that point -- is it safe to rely on
this fact or is it best to wait until read() returns 0 ?

Just what would you typically do when select() reports an exception pending on
a file descriptor -- what would be a prudent or logical response to this
situation?

Thanks in advance!  E-mail would be appreciated.

- Esk.

--
"I hear the roar of a big machine
 Two worlds and in between
 Hot metal and methedrine
 I hear empire down..." -- The Sisters Of Mercy (Lucretia My Reflection)

 
 
 

1. Exceptional Condition Pending

An application written for IPX, Sparc 5 and Sparc 4 using C language
and SunOS 4.1.3.

The application uses select() system call to examine I/O descriptors
for read, write and exceptional condition pending.
While there is no problem with IPX and Sparc 5, running it on Sparc 4
will cause an exceptional condition pending error.

Why is there a difference with Sparc 4, and what do I need to do ?


2. How to run Linux sdoom over modem?

3. What makes select exceptional?

4. New or Revised TAs on websco, 961012

5. Select/Poll says data pending but subsequent read blocks.

6. User migration from W2000 to linux per ldap

7. Help: with select(2) to detect pending stdin

8. vacation program

9. Q: Using select() to wait for pending input.

10. Race conditions in driver select and poll methods

11. accept(2) : race condition works better than select(2)?

12. Matrox Mystique ands X.

13. need to restrict users doing a su to a selected group of users