diff options
| author | Steve French <sfrench@us.ibm.com> | 2006-03-03 06:27:25 -0500 |
|---|---|---|
| committer | Steve French <sfrench@us.ibm.com> | 2006-03-03 06:27:25 -0500 |
| commit | c6ee60b7c8bbc78e3b1776b2820a7e7f95f8996a (patch) | |
| tree | 99b48ef0f5217fddc0aa897d9e60d95ace7da6ff /arch/um/os-Linux/process.c | |
| parent | 13298defe5323c7fdcac268f588d8d1090758fb8 (diff) | |
| parent | c499ec24c31edf270e777a868ffd0daddcfe7ebd (diff) | |
Merge with /pub/scm/linux/kernel/git/torvalds/linux-2.6.git
Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'arch/um/os-Linux/process.c')
| -rw-r--r-- | arch/um/os-Linux/process.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/arch/um/os-Linux/process.c b/arch/um/os-Linux/process.c index 7f5e2dac2a35..d261888f39c4 100644 --- a/arch/um/os-Linux/process.c +++ b/arch/um/os-Linux/process.c | |||
| @@ -19,6 +19,7 @@ | |||
| 19 | #include "irq_user.h" | 19 | #include "irq_user.h" |
| 20 | #include "kern_util.h" | 20 | #include "kern_util.h" |
| 21 | #include "longjmp.h" | 21 | #include "longjmp.h" |
| 22 | #include "skas_ptrace.h" | ||
| 22 | 23 | ||
| 23 | #define ARBITRARY_ADDR -1 | 24 | #define ARBITRARY_ADDR -1 |
| 24 | #define FAILURE_PID -1 | 25 | #define FAILURE_PID -1 |
| @@ -100,6 +101,21 @@ void os_kill_process(int pid, int reap_child) | |||
| 100 | 101 | ||
| 101 | } | 102 | } |
| 102 | 103 | ||
| 104 | /* This is here uniquely to have access to the userspace errno, i.e. the one | ||
| 105 | * used by ptrace in case of error. | ||
| 106 | */ | ||
| 107 | |||
| 108 | long os_ptrace_ldt(long pid, long addr, long data) | ||
| 109 | { | ||
| 110 | int ret; | ||
| 111 | |||
| 112 | ret = ptrace(PTRACE_LDT, pid, addr, data); | ||
| 113 | |||
| 114 | if (ret < 0) | ||
| 115 | return -errno; | ||
| 116 | return ret; | ||
| 117 | } | ||
| 118 | |||
| 103 | /* Kill off a ptraced child by all means available. kill it normally first, | 119 | /* Kill off a ptraced child by all means available. kill it normally first, |
| 104 | * then PTRACE_KILL it, then PTRACE_CONT it in case it's in a run state from | 120 | * then PTRACE_KILL it, then PTRACE_CONT it in case it's in a run state from |
| 105 | * which it can't exit directly. | 121 | * which it can't exit directly. |
