On 06/26/2012 10:45 AM, levin li wrote:
> +     if ((events & EPOLLHUP) || (events & EPOLLERR)) {
> +             eprintf("request handler error, exit\n");
> +             exit(1);
> +     }

According to the manual

"poll(2) returns a POLLERR event.  As noted above,  write(2)  can never
 overflow  the counter.  However an overflow can occur if 2^64 eventfd
"signal posts" were performed by the KAIO subsystem (theoretically
possible, but practically unlikely). If an overflow has occurred, then
read(2) will return that maximum uint64_t value (i.e., 0xffffffffffffffff)."

We should only check EPOLLERR and event this happens, I think write
event is still valid, so I think we don't need to check events.

Also, if you want to exit the sheep, use panic instead.

Thanks,
Yuan
-- 
sheepdog mailing list
[email protected]
http://lists.wpkg.org/mailman/listinfo/sheepdog

Reply via email to