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

Re: [libvirt] [PATCH] lxc_controller.c: don't ignore failed "accept"



On Tue, Feb 02, 2010 at 11:58:44AM +0100, Jim Meyering wrote:
> coverity complained (rightly) about the risk of closing a negative
> file descriptor.  However, the real problem was the missing test
> for a failed "accept" call.  I'm not 100% sure that a failed
> accept call deserves to provoke a "goto cleanup", but doing that
> is consistent with what the nearby code does upon epoll_ctl failure.

This isn't correct because the incoming client can quit between the
time of poll() indicating its presence, and accept() trying to process
it. This is an expected non-fatal scenario, so it should just be
ignored without quitting. epoll_ctl() by comparison is a fatal system
error, so has to be handled as an unrecoverable error 

Daniel
-- 
|: Red Hat, Engineering, London   -o-   http://people.redhat.com/berrange/ :|
|: http://libvirt.org  -o-  http://virt-manager.org  -o-  http://ovirt.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505  -o-  F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|


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