> ETIME is returned if the timer expires.  Regardless of whether ETIME
 > happens, *nget gets updated to the number of events returned (if neither 
 > ETIME
 > nor EINTR occur, and *nget <= max, then *nget will not be modified, of
 > course).
 > 
 > Think of ETIME/EINTR not as an error but as a supplementary bit of
 > inforation: port_getn() always returns, via the nget input/output
 > argument, the number of events fetched, and ETIME/EINTR merely indicate
 > whether a timeout or signal interrupted the wait for more events.

It may be too late to fix this, but I think this is a flawed aspect of the
API.  It should return 0 if any events were received in the time alotted;
the caller can then check *nget to determine how many were actually
received.  That is, ETIME should be relegated to a hard failure of
receiving no events; pressing it into service for partial failure only
makes programming to the API more error-prone.

-- 
meem
_______________________________________________
networking-discuss mailing list
networking-discuss@opensolaris.org

Reply via email to