Skip to content

Commit

Permalink
Set alarms on child processes in process_test.
Browse files Browse the repository at this point in the history
These alarms used to be there, but got dropped in a previous change
because I had assumed the child processes would inherit the parent's
alarm.
  • Loading branch information
bdarnell committed Jun 3, 2012
1 parent efcab59 commit 3451019
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tornado/test/process_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,11 @@ def get_url(path):
return "http://127.0.0.1:%d%s" % (port, path)
sockets = bind_sockets(port, "127.0.0.1")
# ensure that none of these processes live too long
signal.alarm(5)
signal.alarm(5) # master process
try:
id = fork_processes(3, max_restarts=3)
assert id is not None
signal.alarm(5) # child processes
except SystemExit, e:
# if we exit cleanly from fork_processes, all the child processes
# finished with status 0
Expand Down

0 comments on commit 3451019

Please sign in to comment.