From 3613252f1e80b21292a85d4134cba1e0a7da3c34 Mon Sep 17 00:00:00 2001 From: Hatter Jiang Date: Sun, 24 May 2026 00:23:06 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=97=91=EF=B8=8F=20Remove=20subprocess=20b?= =?UTF-8?q?ackground=20execution=20logic=20from=20test=20script?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- subprocess_test_2.py | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/subprocess_test_2.py b/subprocess_test_2.py index 4f75ff6..27ba0ce 100755 --- a/subprocess_test_2.py +++ b/subprocess_test_2.py @@ -64,19 +64,3 @@ if __name__ == "__main__": ) 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)