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 <serue@us.ibm.com>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
This commit is contained in:
Serge E. Hallyn 2009-03-09 14:28:38 -05:00 committed by Daniel Lezcano
parent 47f3833097
commit 30761e835c
2 changed files with 6 additions and 2 deletions

View File

@ -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

View File

@ -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