LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Reply
  Search this Thread
Old 01-16-2008, 01:52 AM   #1
parisa_kian
LQ Newbie
 
Registered: Jan 2008
Posts: 6

Rep: Reputation: 0
ptrace (need help with ptrace_check_attach() function)


hi everyone,
I`ve two questions...I`d be thankful if anyone could help me find their answers....
1- what does TASK_PTRACED state mean? and how it differ from TASK_STOPPED state?
2- what is ptrace_check_attch() function used for?
in "kernel/ptrace.c", linux kernel says:
* Check that we have indeed attached to the thing..
/*
* We take the read lock around doing both checks to close a
* possible race where someone else was tracing our child and
* detached between these two checks. After this locked check,
* we are sure that this is our traced child and that can only
* be changed by us so it's not changing right after this.
*/
is it possible that more than one process could successfully execute ptrace_attach() for tracing the same process?
so why we need ptrace_check_attach?


thanks
 
Old 02-10-2008, 12:55 AM   #2
parisa_kian
LQ Newbie
 
Registered: Jan 2008
Posts: 6

Original Poster
Rep: Reputation: 0
no answer yet!
 
  


Reply

Tags
ptrace



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to use ptrace to trace a cloned process ?? Sreeram B S Programming 1 05-01-2007 11:40 AM
A ptrace questions help needed Pratik H Pandya Programming 2 01-30-2007 02:40 AM
A main can be changed by a function local without passing anything to the function? ananthbv Programming 10 05-04-2004 01:31 PM
ptrace jucovschi Programming 0 08-28-2003 03:20 AM
Compile error in ptrace.c with 2.4.7 tinytim Linux - General 0 08-07-2001 07:01 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 11:46 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration