]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
s390 sys_clone is backwards
authorSerge E. Hallyn <serue@us.ibm.com>
Mon, 9 Mar 2009 19:28:38 +0000 (14:28 -0500)
committerDaniel Lezcano <dlezcano@fr.ibm.com>
Mon, 9 Mar 2009 19:46:06 +0000 (20:46 +0100)
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 <serue@us.ibm.com>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
src/lxc/lxc_namespace.h
src/lxc/namespace.h

index 3bef4a8fe7869ad131fe77e3016172fb239ed3de..ec51cb4b9868bd5dbb3e7e990ea842c10239e885 100644 (file)
 #    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
index 4059368643d7f866dbef0837dde5e03bc19a1f57..004af4bf827d26be7ad906815d60928a118fd476 100644 (file)
 #    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