summaryrefslogtreecommitdiff
path: root/arch/um/os-Linux/skas/process.c
diff options
context:
space:
mode:
authorPaul Mackerras <paulus@samba.org>2007-12-21 22:21:08 +1100
committerPaul Mackerras <paulus@samba.org>2007-12-21 22:21:08 +1100
commitc2a7dcad9f0d92d7a96e735abb8bec7b9c621536 (patch)
treebf9b20fdd5ab07e5b0e4e0b95c6a3dbab1005cb9 /arch/um/os-Linux/skas/process.c
parent373a6da165ac3012a74fd072da340eabca55d031 (diff)
parentea67db4cdbbf7f4e74150e71da0984e25121f500 (diff)
Merge branch 'linux-2.6'
Diffstat (limited to 'arch/um/os-Linux/skas/process.c')
-rw-r--r--arch/um/os-Linux/skas/process.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/arch/um/os-Linux/skas/process.c b/arch/um/os-Linux/skas/process.c
index d77c81d7068a..e8b7a97e83d3 100644
--- a/arch/um/os-Linux/skas/process.c
+++ b/arch/um/os-Linux/skas/process.c
@@ -64,7 +64,7 @@ void wait_stub_done(int pid)
int n, status, err;
while (1) {
- CATCH_EINTR(n = waitpid(pid, &status, WUNTRACED));
+ CATCH_EINTR(n = waitpid(pid, &status, WUNTRACED | __WALL));
if ((n < 0) || !WIFSTOPPED(status))
goto bad_wait;
@@ -153,7 +153,7 @@ static void handle_trap(int pid, struct uml_pt_regs *regs,
panic("handle_trap - continuing to end of syscall "
"failed, errno = %d\n", errno);
- CATCH_EINTR(err = waitpid(pid, &status, WUNTRACED));
+ CATCH_EINTR(err = waitpid(pid, &status, WUNTRACED | __WALL));
if ((err < 0) || !WIFSTOPPED(status) ||
(WSTOPSIG(status) != SIGTRAP + 0x80)) {
err = ptrace_dump_regs(pid);
@@ -255,16 +255,18 @@ int start_userspace(unsigned long stub_stack)
panic("start_userspace : mmap failed, errno = %d", errno);
sp = (unsigned long) stack + UM_KERN_PAGE_SIZE - sizeof(void *);
- flags = CLONE_FILES | SIGCHLD;
+ flags = CLONE_FILES;
if (proc_mm)
flags |= CLONE_VM;
+ else
+ flags |= SIGCHLD;
pid = clone(userspace_tramp, (void *) sp, flags, (void *) stub_stack);
if (pid < 0)
panic("start_userspace : clone failed, errno = %d", errno);
do {
- CATCH_EINTR(n = waitpid(pid, &status, WUNTRACED));
+ CATCH_EINTR(n = waitpid(pid, &status, WUNTRACED | __WALL));
if (n < 0)
panic("start_userspace : wait failed, errno = %d",
errno);
@@ -314,7 +316,7 @@ void userspace(struct uml_pt_regs *regs)
"pid=%d, ptrace operation = %d, errno = %d\n",
pid, op, errno);
- CATCH_EINTR(err = waitpid(pid, &status, WUNTRACED));
+ CATCH_EINTR(err = waitpid(pid, &status, WUNTRACED | __WALL));
if (err < 0)
panic("userspace - waitpid failed, errno = %d\n",
errno);