Incomplete Process Termination Process (#2205)

The Notepad process was not terminating after the command execution
Line Added: 
taskkill /im notepad.exe /t /f > NUL 2>&1
 
The /t option makes sure any child processes are closed as well, and the /f option forcefully terminates the process.
The > NUL redirects the stdout to the NUL device (the equivalent of /dev/null) and the 2 >&1 also redirects the stderr to stdout so that nothing is output to the console
This commit is contained in:
Mohana Shankar D
2022-10-26 20:43:05 +05:30
committed by GitHub
parent aa218974e7
commit dba79489fb
+2 -1
View File
@@ -27,7 +27,8 @@ atomic_tests:
executor:
command: |
netsh.exe add helper #{helper_file}
taskkill /im notepad.exe /t /f > NUL 2>&1
cleanup_command: |
netsh.exe delete helper #{helper_file}
name: command_prompt
elevation_required: true
elevation_required: true