Newbie: How independent are multiple python processes?

Martijn Faassen m.faassen at vet.uu.nl
Wed Jun 6 18:08:39 EDT 2001


Ron Scinta <nb0klun71q5001 at sneakemail.com> wrote:
> I am wondering how much individual python processes are independent?

> Meaning, if I am running proc1 and proc2, I assume they each have their own
> python interpreter running.
> But, what if proc1 crashes the python interpreter and core dumps for
> example. Are there shared resources between these two processes that could
> affect proc2? Python Shared Libraries?

If you're actually running multiple processes you should be as safe or
unsafe as running *any* application in multiple processes. Processes
are supposed to run in isolation from each other, and many OSes do a
good job at this, so it's normally pretty safe.

If you're thinking about multiple *threads* however (which look a lot
like processes on some platforms, like Linux), the situation is
entirely different. If one thread crashes the entire app will likely
be in trouble.

Core dumps created by python interpreters are however usually pretty
rare. What kind of application do you have in mind?

Regards,

Martijn
-- 
History of the 20th Century: WW1, WW2, WW3?
No, WWW -- Could we be going in the right direction?



More information about the Python-list mailing list