Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 # Copyright 2016 The Chromium Authors. All rights reserved. | |
| 2 # Use of this source code is governed by a BSD-style license that can be | |
| 3 # found in the LICENSE file. | |
| 4 | |
| 5 """Tests that daemons that hang on to STDOUT can't cause the engine to hang.""" | |
| 6 | |
| 7 DEPS = [ | |
| 8 'python', | |
| 9 ] | |
| 10 | |
| 11 def RunSteps(api): | |
| 12 api.python.inline("bad deamon", """ | |
| 13 import os | |
| 14 import time | |
| 15 import sys | |
| 16 | |
| 17 print "parent" | |
| 18 pid = os.fork() | |
| 19 if pid > 0: | |
| 20 "parent leaves" | |
| 21 sys.exit(0) | |
| 22 | |
| 23 print "child" | |
| 24 pid = os.fork() | |
| 25 if pid > 0: | |
| 26 "child leaves" | |
| 27 sys.exit(0) | |
| 28 | |
| 29 print "daemon sleepin'" | |
| 30 time.sleep(30) | |
| 31 | |
| 32 print "ROAAARRRR!!!" | |
| 33 """) | |
| 34 | |
| 35 def GenTests(api): | |
| 36 yield api.test('basic') | |
| 37 | |
| OLD | NEW |