summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorOleg Nesterov <oleg@tv-sign.ru>2008-04-30 00:53:13 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2008-04-30 08:29:38 -0700
commit53b6f9fbd3b63af14b4f6268e8b5b80d178d05bc (patch)
tree93a5bd26974e07a3d7fa20dc17c8b70daacc1d85 /include
parent2800d8d19e51414403df8144eaa214bb03400b87 (diff)
downloadop-kernel-dev-53b6f9fbd3b63af14b4f6268e8b5b80d178d05bc.zip
op-kernel-dev-53b6f9fbd3b63af14b4f6268e8b5b80d178d05bc.tar.gz
ptrace: introduce ptrace_reparented() helper
Add another trivial helper for the sake of grep. It also auto-documents the fact that ->parent != real_parent implies ->ptrace. No functional changes. Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru> Acked-by: Roland McGrath <roland@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/ptrace.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/ptrace.h b/include/linux/ptrace.h
index ebe0c17..f98501b 100644
--- a/include/linux/ptrace.h
+++ b/include/linux/ptrace.h
@@ -98,6 +98,10 @@ extern void ptrace_untrace(struct task_struct *child);
extern int ptrace_may_attach(struct task_struct *task);
extern int __ptrace_may_attach(struct task_struct *task);
+static inline int ptrace_reparented(struct task_struct *child)
+{
+ return child->real_parent != child->parent;
+}
static inline void ptrace_link(struct task_struct *child,
struct task_struct *new_parent)
{
OpenPOWER on IntegriCloud