🗑️ Remove subprocess background execution logic from test script
This commit is contained in:
@@ -64,19 +64,3 @@ if __name__ == "__main__":
|
|||||||
)
|
)
|
||||||
|
|
||||||
print("*" * 100)
|
print("*" * 100)
|
||||||
subprocess.Popen(
|
|
||||||
['sleep', '50'],
|
|
||||||
stdout=subprocess.DEVNULL,
|
|
||||||
stderr=subprocess.DEVNULL,
|
|
||||||
preexec_fn=os.setpgrp # 让子进程独立,即使当前脚本挂了它也继续运行 for Linux/Unix/MacOS
|
|
||||||
)
|
|
||||||
# for Windows
|
|
||||||
# flags = 0x00000008 | 0x00000200
|
|
||||||
# process = subprocess.Popen(
|
|
||||||
# ["cmd", "/c", "your_script.bat"],
|
|
||||||
# stdout=subprocess.DEVNULL,
|
|
||||||
# stderr=subprocess.DEVNULL,
|
|
||||||
# creationflags=flags
|
|
||||||
# )
|
|
||||||
|
|
||||||
print("*" * 100)
|
|
||||||
|
|||||||
Reference in New Issue
Block a user