Why does start_new_thread() create an extra process under Linux?

Jon Perez jbperez808 at wahoo.com
Thu Jul 29 05:51:49 EDT 2004


Running the following under Linux creates
3 processes instead of 2.  Once the started
thread exits, 2 processes still remain.  Why?


import thread
from thread import start_new_thread

def newthread():
   print "child"

   .... suitable delay ...

   thread.exit()


start_new_thread(newthread, () )
while 1:
   pass


Note:  am running Linux Kernel 2.6.7 / glibc 2.3.2 (Slackware 10)



More information about the Python-list mailing list