Use this alternate spawn wrapper instead of spawnAsync when spawning long-running processes to
avoid orphaned child process trees on Windows.
Warning: Do NOT use this for generating commands dynamically from user input as it could be used to execute arbitrary code.
This is meant solely for building up known commands that are not made up of unsanitized user input, and only at compile time.
See winInstallCert and winUninstallCert for examples of taking user input and inserting it safely into known commands.
Parameters
command: string
The command to spawn
Optionalargs: string[]
The arguments to pass to the command
Optionalcwd: string
The current working directory to run the command from - defaults to process.cwd()
Use this alternate spawn wrapper instead of spawnAsync when spawning long-running processes to avoid orphaned child process trees on Windows.
Warning: Do NOT use this for generating commands dynamically from user input as it could be used to execute arbitrary code. This is meant solely for building up known commands that are not made up of unsanitized user input, and only at compile time. See winInstallCert and winUninstallCert for examples of taking user input and inserting it safely into known commands.