Commit 8b8b04f8 by dlezcano

Add lxc.7 man page

From: Daniel Lezcano <dlezcano@fr.ibm.com> Added the overview man page for lxc. Signed-off-by: 's avatarDaniel Lezcano <dlezcano@fr.ibm.com>
parent 8a67a2b2
...@@ -58,6 +58,7 @@ AC_CONFIG_FILES([ ...@@ -58,6 +58,7 @@ AC_CONFIG_FILES([
doc/lxc-ps.sgml doc/lxc-ps.sgml
doc/lxc-cgroup.sgml doc/lxc-cgroup.sgml
doc/lxc.conf.sgml doc/lxc.conf.sgml
doc/lxc.sgml
src/Makefile src/Makefile
src/lxc/Makefile src/lxc/Makefile
...@@ -82,6 +83,7 @@ if test "x$DOCBOOK" = "xno"; then ...@@ -82,6 +83,7 @@ if test "x$DOCBOOK" = "xno"; then
Warning: Warning:
-------- --------
The docbook tool is not installed, the man pages won't be generated. The docbook tool is not installed, the man pages won't be generated.
If you want the man pages, install docbook and rerun 'configure'.
]) ])
......
...@@ -13,7 +13,9 @@ man_MANS = \ ...@@ -13,7 +13,9 @@ man_MANS = \
lxc-ps.1 \ lxc-ps.1 \
lxc-cgroup.1 \ lxc-cgroup.1 \
\ \
lxc.conf.5 lxc.conf.5 \
\
lxc.7
%.1 : %.sgml %.1 : %.sgml
...@@ -22,6 +24,9 @@ man_MANS = \ ...@@ -22,6 +24,9 @@ man_MANS = \
%.5 : %.sgml %.5 : %.sgml
docbook2man $< docbook2man $<
%.7 : %.sgml
docbook2man $<
clean-local: clean-local:
$(RM) manpage.* *.1 *.sgml $(man_MANS) $(RM) manpage.* *.7 *.5 *.1 *.sgml $(man_MANS)
endif endif
\ No newline at end of file
...@@ -49,11 +49,9 @@ int lxc_start(const char *name, char *argv[]) ...@@ -49,11 +49,9 @@ int lxc_start(const char *name, char *argv[])
{ {
char init[MAXPATHLEN]; char init[MAXPATHLEN];
char *val = NULL; char *val = NULL;
char ttyname[MAXPATHLEN];
int fd, lock, sv[2], sync = 0, err = -LXC_ERROR_INTERNAL; int fd, lock, sv[2], sync = 0, err = -LXC_ERROR_INTERNAL;
pid_t pid; pid_t pid;
int clone_flags; int clone_flags;
ssize_t n;
lock = lxc_get_lock(name); lock = lxc_get_lock(name);
if (lock < 0) { if (lock < 0) {
...@@ -66,17 +64,11 @@ int lxc_start(const char *name, char *argv[]) ...@@ -66,17 +64,11 @@ int lxc_start(const char *name, char *argv[])
/* Begin the set the state to STARTING*/ /* Begin the set the state to STARTING*/
if (lxc_setstate(name, 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; 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 */ /* Synchro socketpair */
if (socketpair(AF_LOCAL, SOCK_STREAM, 0, sv)) { if (socketpair(AF_LOCAL, SOCK_STREAM, 0, sv)) {
lxc_log_syserror("failed to create communication socketpair"); lxc_log_syserror("failed to create communication socketpair");
...@@ -128,11 +120,6 @@ int lxc_start(const char *name, char *argv[]) ...@@ -128,11 +120,6 @@ int lxc_start(const char *name, char *argv[])
goto out_child; 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)) { if (prctl(PR_CAPBSET_DROP, CAP_SYS_BOOT, 0, 0, 0)) {
lxc_log_syserror("failed to remove CAP_SYS_BOOT capability"); lxc_log_syserror("failed to remove CAP_SYS_BOOT capability");
goto out_child; goto out_child;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment