[issue8028] self.terminate() from a multiprocessing.Process raises AttributeError exception

Ask Solem report at bugs.python.org
Wed Nov 3 21:38:39 CET 2010

Ask Solem <askh at opera.com> added the comment:

Since you can't specify the return code, `self.terminate` is less flexible than `sys.exit`.

I think the original intent is clear here, the method is there for the parent to control the child.  You are of course welcome to argue otherwise.

By the way, I just read the code and noticed that it handles SystemExit well, and supports using it to set the return code:

    class X(Process):
        def run(self):
            if not frobulating:
                raise SystemExit(255)


Python tracker <report at bugs.python.org>

More information about the Python-bugs-list mailing list