From: Serge E. Hallyn Date: Mon, 9 Mar 2009 19:28:38 +0000 (-0500) Subject: s390 sys_clone is backwards X-Git-Tag: lxc_0_6_1~14 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=30761e835c7b8720c8ea9316b44bcf39be49d93d;p=thirdparty%2Flxc.git s390 sys_clone is backwards Switch the flags and sp for sys_clone for s390. Without this, lxc-execute gets a segfault on clone (of course). With this, it succeeds. Signed-off-by: Serge Hallyn Signed-off-by: Daniel Lezcano --- diff --git a/src/lxc/lxc_namespace.h b/src/lxc/lxc_namespace.h index 3bef4a8fe..ec51cb4b9 100644 --- a/src/lxc/lxc_namespace.h +++ b/src/lxc/lxc_namespace.h @@ -60,8 +60,10 @@ # error "unsupported architecture" # endif #endif -#if __i386__ || __x86_64__ || __s390__ || __powerpc__ +#if __i386__ || __x86_64__ || __powerpc__ # define fork_ns(flags) syscall(SYS_clone, flags|SIGCHLD, NULL) +#elif __s390__ +# define fork_ns(flags) syscall(SYS_clone, NULL, flags|SIGCHLD) #elif __ia64__ # define fork_ns(flags) syscall(SYS_clone2, flags|SIGCHLD, NULL) #else diff --git a/src/lxc/namespace.h b/src/lxc/namespace.h index 405936864..004af4bf8 100644 --- a/src/lxc/namespace.h +++ b/src/lxc/namespace.h @@ -60,8 +60,10 @@ # error "unsupported architecture" # endif #endif -#if __i386__ || __x86_64__ || __s390__ || __powerpc__ +#if __i386__ || __x86_64__ || __powerpc__ # define fork_ns(flags) syscall(SYS_clone, flags|SIGCHLD, NULL); +#elif __s390__ +# define fork_ns(flags) syscall(SYS_clone, NULL, flags|SIGCHLD) #elif __ia64__ # define fork_ns(flags) syscall(SYS_clone2, flags|SIGCHLD, NULL); #else