os.fork() question?

Ishwar Rattan rattan at cps.cmich.edu
Mon Sep 13 17:05:42 EDT 2004


Info at http://doc.python.org/ on os.fork() says that
  it has 'unix' semantics (on a UNIX box) on return values
  child pid in parent, 0 in child, no mention of failure?

So, what does it return on failure? I tried it under Linux
with Python-2.3.4, after few thousand forks the system just hangs!
(does not return/report fork failure)

Another question on module 'mutex' (stumbuled on it while looking
for info on threads). What is its purpose? (sample code for usage
of lock() and unlock() will be nice too).

-ishwar



More information about the Python-list mailing list