blob: 908afe3045f838f210cd31aeed23daf2fc365131 [file] [log] [blame]
Richard Oudkerke88a2442012-08-14 11:41:32 +01001import multiprocessing, sys
2
3def foo():
4 print("123")
5
6# Because "if __name__ == '__main__'" is missing this will not work
7# correctly on Windows. However, we should get a RuntimeError rather
8# than the Windows equivalent of a fork bomb.
9
10p = multiprocessing.Process(target=foo)
11p.start()
12p.join()
13sys.exit(p.exitcode)