Fix error when two linker processes fail
When a linker process fails, `failed` will be set to a value other than `None`. When a second linker process fails, the `else` case will be taken because `failed is None`, which executes `compile_cmd.on_success()`. This function tries to rename or move the file generated by the linker but since the linker process failed, the file will most likely not exist. This will throw an error, which will prevent printing the actual error message from the linker.
This commit is contained in:
parent
62da158823
commit
4f7d12f3fd
3
setup.py
3
setup.py
@ -379,7 +379,8 @@ def parallel_run(items):
|
|||||||
return
|
return
|
||||||
pid, s = os.wait()
|
pid, s = os.wait()
|
||||||
compile_cmd, w = workers.pop(pid, (None, None))
|
compile_cmd, w = workers.pop(pid, (None, None))
|
||||||
if compile_cmd is not None and ((s & 0xff) != 0 or ((s >> 8) & 0xff) != 0) and failed is None:
|
if compile_cmd is not None and ((s & 0xff) != 0 or ((s >> 8) & 0xff) != 0):
|
||||||
|
if failed is None:
|
||||||
failed = compile_cmd
|
failed = compile_cmd
|
||||||
elif compile_cmd.on_success is not None:
|
elif compile_cmd.on_success is not None:
|
||||||
compile_cmd.on_success()
|
compile_cmd.on_success()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user