[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Exception Conditions



> The patch for exceptional conditions is interesting, but can someone
> explain what an exception condition is?  Would be something like, someone
> closing a pipe your reading?  Or a media change on the drive for which
> you are doing IO?   Or maybe a loss of carrier?

 Well, as I said, I merely did it so that Kay Roemer can use it in his
socket interface. Some net-protocols define the use of urgent out-of-band
data, which does not get queued in the normal input buffers, but is passed
to the client directly. That's an exceptional condition for example.

> How do read the condition?  Fread?

 Well, for sockets, where you know that an exceptional conditions means the
arrival of out-of-band data, you can use the same read or receive call as
for normal data, only with a special flag set. For other devices I must admit
that I don't know it. Not that I've ever heard of them being used at all, but
then I haven't heard so may things... ;-)

> Is it possible to use an exception condition with Fselect, to "wait for
> carrier" or to detect the loss of such (so, could you wait for a change
> in the carrier status?)

 Yes, you can call Fselect() to explicitly sleep until an exceptional
condition happens on the selected file. For your modem problem - as I said
above - you would have to define something to determine *what* kind of
thing has happened, probably some more ioctl() calls to check for carrier
or RI or so.

> If so, then this would be very useful indeed.

 I hope so. :-)

 To make it totally clear: *NONE* of the up-to-date drivers supports them now!

ciao,
TeSche
-- 
Torsten Scherer (TeSche, Schiller...)
Faculty of Technology, University of Bielefeld, Germany, Europe, Earth...
| Use any of "finger itschere@129.70.131.2-15" for adresses and more.|
| Last updated: 14. April 1994.|