From 8b8b04f80adf21480c25deb1aae263049ddd6754 Mon Sep 17 00:00:00 2001 From: dlezcano Date: Thu, 20 Nov 2008 15:04:09 +0000 Subject: [PATCH] Add lxc.7 man page From: Daniel Lezcano Added the overview man page for lxc. Signed-off-by: Daniel Lezcano --- configure.in | 2 ++ doc/Makefile.am | 9 +++++++-- src/lxc/start.c | 17 ++--------------- 3 files changed, 11 insertions(+), 17 deletions(-) diff --git a/configure.in b/configure.in index bcfc56402..1b905c502 100644 --- a/configure.in +++ b/configure.in @@ -58,6 +58,7 @@ AC_CONFIG_FILES([ doc/lxc-ps.sgml doc/lxc-cgroup.sgml doc/lxc.conf.sgml + doc/lxc.sgml src/Makefile src/lxc/Makefile @@ -82,6 +83,7 @@ if test "x$DOCBOOK" = "xno"; then Warning: -------- The docbook tool is not installed, the man pages won't be generated. +If you want the man pages, install docbook and rerun 'configure'. ]) diff --git a/doc/Makefile.am b/doc/Makefile.am index 707aa9bce..f4298fd7e 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -13,7 +13,9 @@ man_MANS = \ lxc-ps.1 \ lxc-cgroup.1 \ \ - lxc.conf.5 + lxc.conf.5 \ + \ + lxc.7 %.1 : %.sgml @@ -22,6 +24,9 @@ man_MANS = \ %.5 : %.sgml docbook2man $< +%.7 : %.sgml + docbook2man $< + clean-local: - $(RM) manpage.* *.1 *.sgml $(man_MANS) + $(RM) manpage.* *.7 *.5 *.1 *.sgml $(man_MANS) endif \ No newline at end of file diff --git a/src/lxc/start.c b/src/lxc/start.c index 26938efa9..556767591 100644 --- a/src/lxc/start.c +++ b/src/lxc/start.c @@ -49,11 +49,9 @@ int lxc_start(const char *name, char *argv[]) { char init[MAXPATHLEN]; char *val = NULL; - char ttyname[MAXPATHLEN]; int fd, lock, sv[2], sync = 0, err = -LXC_ERROR_INTERNAL; pid_t pid; int clone_flags; - ssize_t n; lock = lxc_get_lock(name); if (lock < 0) { @@ -66,17 +64,11 @@ int lxc_start(const char *name, char *argv[]) /* Begin the set the state to STARTING*/ if (lxc_setstate(name, STARTING)) { - lxc_log_error("failed to set state '%s'", lxc_state2str(STARTING)); + lxc_log_error("failed to set state '%s'", + lxc_state2str(STARTING)); goto out; } - n = readlink("/proc/self/fd/0", ttyname, sizeof(ttyname)); - if (n < 0) { - lxc_log_syserror("failed to read '/proc/self/fd/0'"); - goto out; - } - ttyname[n] = '\0'; - /* Synchro socketpair */ if (socketpair(AF_LOCAL, SOCK_STREAM, 0, sv)) { lxc_log_syserror("failed to create communication socketpair"); @@ -128,11 +120,6 @@ int lxc_start(const char *name, char *argv[]) goto out_child; } - if (mount(ttyname, "/dev/console", "none", MS_BIND, 0)) { - lxc_log_syserror("failed to mount '/dev/console'"); - goto out_child; - } - if (prctl(PR_CAPBSET_DROP, CAP_SYS_BOOT, 0, 0, 0)) { lxc_log_syserror("failed to remove CAP_SYS_BOOT capability"); goto out_child; -- 2.39.2