insightpax.blogg.se

Run subprocess in background python
Run subprocess in background python









run subprocess in background python

The start command doesn’t wait unless /W is used, e.g. If the /B option is used, then it creates a new process group in the current session. a complex pipeline).īy default, CMD’s internal start command executes the command line in a new console session and a new console process group that ignores Ctrl+C. On Windows it’s generally wrong because subprocess.list2cmdline() only supports argument quoting and escaping that matches WinAPI CommandLineToArgvW(), but the CMD shell uses different rules, and in general multiple rule sets may have to be supported (e.g. On POSIX using an argument list with shell=True is generally wrong because the arguments are passed as parameters to the shell. Generally you should use a command-line string with shell=True.











Run subprocess in background python