shutdowntest.c revision dc23c1c817da5c13529432270e51d0f7f3b1e95e
/* liblxcapi
*
* Copyright © 2012 Serge Hallyn <serge.hallyn@ubuntu.com>.
* Copyright © 2012 Canonical Ltd.
*
* it under the terms of the GNU General Public License version 2, as
* published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include "../lxc/lxccontainer.h"
#include <unistd.h>
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
#define MYNAME "lxctest1"
{
struct lxc_container *c;
int ret = 1;
ret = 1;
goto out;
}
if (c->is_defined(c)) {
goto out;
}
goto out;
}
goto out;
}
if (!c->is_defined(c)) {
goto out;
}
c->load_config(c, NULL);
c->want_daemonize(c);
goto out;
}
if (!c->shutdown(c, 60)) {
goto out;
}
if (!c->destroy(c)) {
goto out;
}
if (c->is_defined(c)) {
goto out;
}
ret = 0;
out:
}