Reviewed-by: Chen Hanxiao <chenhanxiao@xxxxxxxxxxxxxx> > -----Original Message----- > From: libvir-list-bounces@xxxxxxxxxx [mailto:libvir-list-bounces@xxxxxxxxxx] > On Behalf Of Daniel P. Berrange > Sent: Saturday, October 12, 2013 12:54 AM > To: libvir-list@xxxxxxxxxx > Subject: [PATCH 1/3] Fix exit status of lxc controller > > From: "Daniel P. Berrange" <berrange@xxxxxxxxxx> > > The LXC controller main() method initialized 'rc' to 1 > rather than '-1'. In the cleanup path it will print any > error to stderr, if-and-only-if rc < 0. Hence the incorrect > initialization caused errors to be lost. > > Signed-off-by: Daniel P. Berrange <berrange@xxxxxxxxxx> > --- > src/lxc/lxc_controller.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/src/lxc/lxc_controller.c b/src/lxc/lxc_controller.c > index b881f17..1c6aed6 100644 > --- a/src/lxc/lxc_controller.c > +++ b/src/lxc/lxc_controller.c > @@ -2230,7 +2230,7 @@ cleanup: > int main(int argc, char *argv[]) > { > pid_t pid; > - int rc = 1; > + int rc = -1; > char *name = NULL; > size_t nveths = 0; > char **veths = NULL; > -- > 1.8.3.1 > > -- > libvir-list mailing list > libvir-list@xxxxxxxxxx > https://www.redhat.com/mailman/listinfo/libvir-list -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list