PyImport_ImportModule deadlocks

J

jms

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_ImportModule( "sys" )

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

Gabriel Genellina

En Thu, 28 Aug 2008 11:22:50 -0300, (e-mail address removed)
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_ImportModule( "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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,011
Latest member
AjaUqq1950

Latest Threads

Top