mirror of
git://github.com/lxc/lxc
synced 2025-08-30 18:49:35 +00:00
Fix for ia64: Use __clone2 for ia64 in lxc/start.c
Signed-off-by: Dennis Schridde <devurandom@gmx.net> Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
This commit is contained in:
committed by
Stéphane Graber
parent
d71d919efb
commit
7f145a6d0d
@@ -564,7 +564,7 @@ static int must_drop_cap_sys_boot(void)
|
||||
FILE *f = fopen("/proc/sys/kernel/ctrl-alt-del", "r");
|
||||
int ret, cmd, v;
|
||||
long stack_size = 4096;
|
||||
void *stack = alloca(stack_size) + stack_size;
|
||||
void *stack = alloca(stack_size);
|
||||
int status;
|
||||
pid_t pid;
|
||||
|
||||
@@ -581,7 +581,12 @@ static int must_drop_cap_sys_boot(void)
|
||||
}
|
||||
cmd = v ? LINUX_REBOOT_CMD_CAD_ON : LINUX_REBOOT_CMD_CAD_OFF;
|
||||
|
||||
#ifdef __ia64__
|
||||
pid = __clone2(container_reboot_supported, stack, stack_size, CLONE_NEWPID | SIGCHLD, &cmd);
|
||||
#else
|
||||
stack += stack_size;
|
||||
pid = clone(container_reboot_supported, stack, CLONE_NEWPID | SIGCHLD, &cmd);
|
||||
#endif
|
||||
if (pid < 0) {
|
||||
SYSERROR("failed to clone\n");
|
||||
return -1;
|
||||
|
Reference in New Issue
Block a user