lxc_start.c revision c36583c3034ca430c98fc0b5afe6e8f0c6511258
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes * lxc: linux Container library
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes * (C) Copyright IBM Corp. 2007, 2008
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes * Daniel Lezcano <dlezcano at fr.ibm.com>
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes * This library is free software; you can redistribute it and/or
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes * modify it under the terms of the GNU Lesser General Public
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes * License as published by the Free Software Foundation; either
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes * version 2.1 of the License, or (at your option) any later version.
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes * This library is distributed in the hope that it will be useful,
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes * but WITHOUT ANY WARRANTY; without even the implied warranty of
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes * Lesser General Public License for more details.
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes * You should have received a copy of the GNU Lesser General Public
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes * License along with this library; if not, write to the Free Software
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
bb2b38cd44b032118359afbc743efbea12f48e61bnicholesstatic int my_parser(struct lxc_arguments* args, int c, char* arg)
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes switch (c) {
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes--name=NAME -- COMMAND\n\
bb2b38cd44b032118359afbc743efbea12f48e61bnicholeslxc-start start COMMAND in specified container NAME\n\
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes -n, --name=NAME NAME for name of the container\n\
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes -d, --daemon daemonize the container",
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes WARN("failed to get current terminal settings : %s",
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes void (*oldhandler)(int);
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes ERROR("failed to get current terminal settings : %s",
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes char *const *args;
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes char *const default_args[] = {
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes if (lxc_log_init(my_args.log_file, my_args.log_priority,
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes SYSERROR("failed to daemonize '%s'", my_args.name);