aboutsummaryrefslogtreecommitdiff
path: root/arch/um/os-Linux/process.c
diff options
context:
space:
mode:
authorDave Kleikamp <shaggy@austin.ibm.com>2006-03-14 17:05:45 -0600
committerDave Kleikamp <shaggy@austin.ibm.com>2006-03-14 17:05:45 -0600
commitc5111f504d2a9b0d258d7c4752b4093523315989 (patch)
tree6a52864aff79691689aea21cb0cb928327d5de5b /arch/um/os-Linux/process.c
parent69eb66d7da7dba2696281981347698e1693c2340 (diff)
parenta488edc914aa1d766a4e2c982b5ae03d5657ec1b (diff)
Merge with /home/shaggy/git/linus-clean/
Diffstat (limited to 'arch/um/os-Linux/process.c')
-rw-r--r--arch/um/os-Linux/process.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/arch/um/os-Linux/process.c b/arch/um/os-Linux/process.c
index 7f5e2dac2a3..d261888f39c 100644
--- a/arch/um/os-Linux/process.c
+++ b/arch/um/os-Linux/process.c
@@ -19,6 +19,7 @@
#include "irq_user.h"
#include "kern_util.h"
#include "longjmp.h"
+#include "skas_ptrace.h"
#define ARBITRARY_ADDR -1
#define FAILURE_PID -1
@@ -100,6 +101,21 @@ void os_kill_process(int pid, int reap_child)
}
+/* This is here uniquely to have access to the userspace errno, i.e. the one
+ * used by ptrace in case of error.
+ */
+
+long os_ptrace_ldt(long pid, long addr, long data)
+{
+ int ret;
+
+ ret = ptrace(PTRACE_LDT, pid, addr, data);
+
+ if (ret < 0)
+ return -errno;
+ return ret;
+}
+
/* Kill off a ptraced child by all means available. kill it normally first,
* then PTRACE_KILL it, then PTRACE_CONT it in case it's in a run state from
* which it can't exit directly.