Re: [libvirt] [PATCH] LXC fix rc handling in lxcVmStart

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

 



On Tue, Oct 13, 2009 at 10:57:13AM +0900, Ryota Ozaki wrote:
> Hi,
> 
> In lxcVmStart we have to set rc = -1 before jumping to the cleanup
> code when a local procedure call fails and the rc is overwritten,
> however, some codes don't observe the rule and so invalid cleanups
> are likely to happen.
> 
> A simple solution for the defect is to add rc = -1 before every
> jumping if needed, however, IMHO, we first should not reuse rc for
> another purpose rather than the return value of lxcVmStart. Instead
> the patch introduces yet another variable for storing only the
> return value of the local procedure calls. By doing so, we don't
> need to care about resetting rc anymore.

ACK, this is a  good idea.

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]