Re: [libvirt] [PATCH] retry poll() in EINTR case in virPipeReadUntilEOF

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

 



On Thu, Dec 11, 2008 at 03:25:05PM -0500, Dave Allan wrote:
> I saw a few messages:
> 
> libvir: error : internal error poll error: Interrupted system call
> 
> during daemon-conf tests.  The messages come from virPipeReadUntilEOF. 
> I think the intention is that this case should be retried.  Patch attached.

ACK, definitely neccessary.

> diff --git a/src/util.c b/src/util.c
> index da26009..31a9702 100644
> --- a/src/util.c
> +++ b/src/util.c
> @@ -473,7 +473,7 @@ virPipeReadUntilEOF(virConnectPtr conn, int outfd, int errfd,
>      while(!(finished[0] && finished[1])) {
>  
>          if (poll(fds, ARRAY_CARDINALITY(fds), -1) < 0) {
> -            if (errno == EAGAIN)
> +            if (errno == EAGAIN || errno == EINTR)
>                  continue;
>              goto pollerr;
>          }


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 :|

--
Libvir-list mailing list
Libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]