Package: python-ptrace
Version: 0.6-2
Severity: normal
When running the following script, passing as argument the pid of any
process of which I am the owner:
#!/usr/bin/python
import sys, ptrace.debugger
pid = int(sys.argv[1])
debugger = ptrace.debugger.PtraceDebugger()
print "processes:", list(debugger)
process = debugger.addProcess(pid, False)
print "processes:", list(debugger)
debugger.deleteProcess(process)
print "processes:", list(debugger)
debugger.addProcess(pid, False)
I always get the following output:
processes: []
processes: [<PtraceProcess #3769>]
processes: []
Traceback (most recent call last):
File "./a.py", line 14, in <module>
debugger.addProcess(pid, False)
File "/usr/lib/pymodules/python2.5/ptrace/debugger/debugger.py", line 74,
in addProcess
process = PtraceProcess(self, pid, is_attached, parent=parent)
File "/usr/lib/pymodules/python2.5/ptrace/debugger/process.py", line 166,
in __init__
self.attach()
File "/usr/lib/pymodules/python2.5/ptrace/debugger/process.py", line 183,
in attach
ptrace_attach(self.pid)
File "/usr/lib/pymodules/python2.5/ptrace/binding/func.py", line 155, in
ptrace_attach
ptrace(PTRACE_ATTACH, pid)
File "/usr/lib/pymodules/python2.5/ptrace/binding/func.py", line 148, in
ptrace
raise PtraceError(message, errno=errno, pid=pid)
ptrace.error.PtraceError: ptrace(cmd=16, pid=3769, 0, 0) error #1: Operation
not permitted
-- System Information:
Debian Release: squeeze/sid
APT prefers unstable
APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)
Kernel: Linux 2.6.30-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages python-ptrace depends on:
ii python 2.5.4-2 An interactive high-level
object-o
ii python-support 1.0.3 automated rebuilding support
for P
python-ptrace recommends no packages.
python-ptrace suggests no packages.
-- no debconf information