ptrace: add error stub to prevent mcexec from waiting

In LTP's ptrace03 test,
there is a exit() preceded by ptrace(PTRACE_TRACEME).
In this case, processes will be usually finished immediately.
But mcexec will fall into waiting for parent's ptrace(PTRACE_CONT),
because mcexec sends itself a signal in processing of exit().
This commit is contained in:
NAKAMURA Gou
2014-06-06 18:40:59 +09:00
parent 2331309d2f
commit 3f13862a98
2 changed files with 12 additions and 0 deletions

View File

@@ -1858,6 +1858,17 @@ SYSCALL_DECLARE(getrlimit)
return ret;
}
SYSCALL_DECLARE(ptrace)
{
const int request = ihk_mc_syscall_arg0(ctx);
const long pid = ihk_mc_syscall_arg1(ctx);
void * const addr = (void *)ihk_mc_syscall_arg2(ctx);
void * const data = (void *)ihk_mc_syscall_arg3(ctx);
kprintf("ptrace(%d,%ld,%p,%p): ENOSYS\n", request, pid, addr, data);
return -ENOSYS;
}
SYSCALL_DECLARE(sched_setaffinity)
{
#if 0