[libvirt] remote clients are non-interruptible

remoteIOEventLoop() has this: 6974 repoll: 6975 ret = poll(fds, ARRAY_CARDINALITY(fds), -1); 6976 if (ret < 0 && errno == EINTR) 6977 goto repoll; with the result that all clients using the remote driver cannot be control-C'd. Dan, you added this code it seems, why? regards john

On Sun, Oct 25, 2009 at 01:00:58PM -0400, John Levon wrote:
remoteIOEventLoop() has this:
6974 repoll: 6975 ret = poll(fds, ARRAY_CARDINALITY(fds), -1); 6976 if (ret < 0 && errno == EINTR) 6977 goto repoll;
with the result that all clients using the remote driver cannot be control-C'd. Dan, you added this code it seems, why?
I'd agree with John here that probably you want to test only for errno == EAGAIN, not EINTR in this (client) case. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones New in Fedora 11: Fedora Windows cross-compiler. Compile Windows programs, test, and build Windows installers. Over 70 libraries supprt'd http://fedoraproject.org/wiki/MinGW http://www.annexia.org/fedora_mingw

On Sun, Oct 25, 2009 at 05:07:12PM +0000, Richard W.M. Jones wrote:
On Sun, Oct 25, 2009 at 01:00:58PM -0400, John Levon wrote:
remoteIOEventLoop() has this:
6974 repoll: 6975 ret = poll(fds, ARRAY_CARDINALITY(fds), -1); 6976 if (ret < 0 && errno == EINTR) 6977 goto repoll;
with the result that all clients using the remote driver cannot be control-C'd. Dan, you added this code it seems, why?
I'd agree with John here that probably you want to test only for errno == EAGAIN, not EINTR in this (client) case.
Looking just at the Linux man page, EAGAIN is not in the list of potential error returns for poll(2), but when looking at one of the OpenGroup pages on the function http://www.opengroup.org/onlinepubs/009695399/functions/poll.html it allows EAGAIN, so I just changed EINTR to EAGAIN, in this function and pushed the change, thanks ! Daniel -- Daniel Veillard | libxml Gnome XML XSLT toolkit http://xmlsoft.org/ daniel@veillard.com | Rpmfind RPM search engine http://rpmfind.net/ http://veillard.com/ | virtualization library http://libvirt.org/

On Sun, Oct 25, 2009 at 01:00:58PM -0400, John Levon wrote:
remoteIOEventLoop() has this:
6974 repoll: 6975 ret = poll(fds, ARRAY_CARDINALITY(fds), -1); 6976 if (ret < 0 && errno == EINTR) 6977 goto repoll;
with the result that all clients using the remote driver cannot be control-C'd. Dan, you added this code it seems, why?
Habit :-) I agree its probably best to remove the EINTR test. 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 :|
participants (4)
-
Daniel P. Berrange
-
Daniel Veillard
-
John Levon
-
Richard W.M. Jones