Re: EV_ERROR for ev_io events?

2008-11-25 Thread Marc Lehmann
On Mon, Nov 24, 2008 at 04:49:36PM -0800, Eric Brown [EMAIL PROTECTED] wrote:
 I had been requesting EV_ERROR events on my io watchers -- mostly because
 that's what I used to do years ago when I had to manually create FD_SETs. Of
 course, I don't recall ever getting an ERROR event ever.

errors are errors, they are no events, and you can't request them.

 And, I noticed libev just added an assertion that EV_ERROR events weren't
 valid for io events (ev.c:2130).

Absolutely - libev will signal *errors* that way, there is no such thing as
an error event.

 I'm guessing this is not a bug in libev and some man page somewhere says
 ERROR events will never be generated on io events?

An error occurs, it is not an event: For example, the select function
could fail with an error of EBADF, which would cause libev to check every
submitted fd and tell the watcher.

Right now, EV_ERROR always means you have a bug in the program using libev.

Which is why requesting an error event makes no sense - it's kind of
askign for please put a bug in the function calling ev_io_start.

 Out of curiosity, does the OS ever generate ERROR events for any type of
 selectable file descriptor? If so, when?

No, the OS api's (like select or poll) cannot even generate error events.
They can flag an error, but there is no such thing as an I/O error when
askign for readyness notifications, as libev doesn't do any I/O.

Maybe you confuse error with the except fd set in select?

-- 
The choice of a   Deliantra, the free code+content MORPG
  -==- _GNU_  http://www.deliantra.net
  ==-- _   generation
  ---==---(_)__  __   __  Marc Lehmann
  --==---/ / _ \/ // /\ \/ /  [EMAIL PROTECTED]
  -=/_/_//_/\_,_/ /_/\_\

___
libev mailing list
libev@lists.schmorp.de
http://lists.schmorp.de/cgi-bin/mailman/listinfo/libev


Re: Fwd: EV_ERROR for ev_io events?

2008-11-25 Thread Marc Lehmann
On Mon, Nov 24, 2008 at 05:58:42PM -0700, Roger Pack [EMAIL PROTECTED] wrote:
 I believe on windows it reports error selectable when there's an error

No, the select fucntion cannot report error events in any way - you also
probably confuse that with the except set, which serves no actual purpose
on standards-compliant systems, and is mapped to EV_WRITE on the buggy
windows platform (as it errornously signals connect readyness that way).

-- 
The choice of a   Deliantra, the free code+content MORPG
  -==- _GNU_  http://www.deliantra.net
  ==-- _   generation
  ---==---(_)__  __   __  Marc Lehmann
  --==---/ / _ \/ // /\ \/ /  [EMAIL PROTECTED]
  -=/_/_//_/\_,_/ /_/\_\

___
libev mailing list
libev@lists.schmorp.de
http://lists.schmorp.de/cgi-bin/mailman/listinfo/libev