STINNER Victor <victor.stin...@haypocalc.com> added the comment:

> In the subprocess, why not use the standard 0 exit code
> in case of success?

Something outside my code may exit Python with the code 0. Even if it unlikely, 
I prefer to use uncommon exit codes, to ensure that the child process executed 
"correctly" my code. A better check would be to write a specific pattern to 
stdout, and check stdout, but it would be overkill.

> Also, points 1 and 3 could be handled simply by having
> the parent process send a signal to the child
> (but this wouldn't address the timeout issue).

(Hum, points 1 and 3: "have only one thread" and "not touch signal handling of 
the parent process".)

True, but I would like to write a more reliable test, and I don't know how to 
synchronize two processes for this test case.

Because your first sentence was "The patch looks good to me.", let's try this 
new test in our buildbots.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue12363>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to