PyImport_ImportModule deadlocks

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • jms@bughunter.ca

    PyImport_ImportModule deadlocks

    Hey all,

    I have an embedded Python shell and everything works fine, however, in
    my stdout catcher (in C to grab tracebacks) for some reason when I do
    a :

    PyImport_Import Module( "sys" )

    It deadlocks the process, is there a need for me to acquire locks
    inside of my stdout catching function before calling that import?
  • Gabriel Genellina

    #2
    Re: PyImport_Import Module deadlocks

    En Thu, 28 Aug 2008 11:22:50 -0300, jms@bughunter.c a
    <justin.seitz@g mail.comescribi �:
    I have an embedded Python shell and everything works fine, however, in
    my stdout catcher (in C to grab tracebacks) for some reason when I do
    a :
    >
    PyImport_Import Module( "sys" )
    >
    It deadlocks the process, is there a need for me to acquire locks
    inside of my stdout catching function before calling that import?
    The deadlock might be due to the import lock. But instead of analyzing
    that issue: why do you want to import sys? The sys module is always
    available. To access its attributes, use PySys_GetObject &Co.

    --
    Gabriel Genellina

    Comment

    Working...