Strange fork() behaviour

Harald Hanche-Olsen hanche at math.ntnu.no
Fri Apr 23 17:21:47 EDT 1999


+ Martin Preishuber <Martin.Preishuber at stuco.uni-klu.ac.at>:

| There are some strange things with fork() and python 1.5.2 going
| on here. 
| 
| I do have some main program which is basically
| 
| while 1:
|     fork()
| 
| The program forks under certain conditions and works as expected
| but somewhen the main process dies even though it is in the
| while 1: loop ... there's no error message ... did anyone
| see anything similar ? the program worked fine with 1.5.1 
| (this is all on a linux box running rh 5.2 and kernel 2.2.6-ac1)

This is a joke, right?  What I would expect the above program to do is
to fork processes until the process table is full or you hit the
per-user process limit, at which point fork() will begin to fail,
which will then most likely terminate the calling process (unless you
trap the error).

I'd be curious to know how this could have worked earlier, or how you
could expect it to behave differently.

or-maybe-basically-really-means-basically-not-ly y'rs,
-- 
* Harald Hanche-Olsen     <URL:http://www.math.ntnu.no/~hanche/>
- "There arises from a bad and unapt formation of words
   a wonderful obstruction to the mind."  - Francis Bacon





More information about the Python-list mailing list