The pkill command seems to return a 1 error code when it cannot any matching processes.
reference
In this case, if the runtime environment has not spawned any child processes then it will return a 1 error-code, causing execSync to throw an error and prevent the runtime from getting killed.
Here we ignore the 1 error code and rethrow any other errors.
The
pkill
command seems to return a 1 error code when it cannot any matching processes. referenceIn this case, if the runtime environment has not spawned any child processes then it will return a 1 error-code, causing execSync to throw an error and prevent the runtime from getting killed.
Here we ignore the 1 error code and rethrow any other errors.