lkml.org 
[lkml]   [1999]   [Oct]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subjectptrace question
Hi guys,

When you ptrace(PTRACE_ATTACH) a process, how do you know when it's safe
to do another ptrace operation? I'm seeing successive ptrace operations
fail with ESRCH because the SIGSTOP hasn't yet been delivered.

The particular case where I see this is 'pstack $$' (from bash) -- but it
only happens about one time in ten. (<http://www.whatsis.com/pstack/>)

This happens with 2.2.13pre15 and with 2.3.20. Intuitively, the check
that the target process is traced should check for pending STOPs (and
either deliver them or return -ERESTARTSYS or something), or else
PTRACE_ATTACH should wait until the target process has had its signal
delivered.

Comments?

Tim.
*/


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:54    [W:0.023 / U:1.112 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site