Issue #13 resolved

Signals not correctly received

Anonymous created an issue

Hi,

I'm writing a tool that needs to catch when a process segfaults. For this purpose I'm using a code that ends up doing this:

    signal = process.waitSignals(11)
    print signal

However, even when the signal 11 (SIGSEGV) is received an exception is raised. This in an example changing the simple_dbg.py example to instead of wait for an event wait for a signal with the code previously mentioned:

Traceback (most recent call last):
  File "examples/simple_dbg.py", line 65, in <module>
    main()
  File "examples/simple_dbg.py", line 61, in main
    playWithProcess(process)
  File "examples/simple_dbg.py", line 15, in playWithProcess
    signal = process.waitSignals(11)
  File "/usr/local/lib/python2.7/dist-packages/python_ptrace-0.8-py2.7.egg/ptrace/debugger/process.py", line 726, in waitSignals
    return self.debugger.waitSignals(*signals, **{'pid': self.pid})
  File "/usr/local/lib/python2.7/dist-packages/python_ptrace-0.8-py2.7.egg/ptrace/debugger/debugger.py", line 192, in waitSignals
    raise event
ptrace.debugger.process_event.ProcessExit: Process 3691 killed by signal SIGSEGV

Am I missing something or doing something wrong?

Comments (2)

  1. Log in to comment