Shanedell commented on code in PR #371:
URL: https://github.com/apache/daffodil-vscode/pull/371#discussion_r1049026004


##########
src/utils.ts:
##########
@@ -173,6 +173,19 @@ export async function executeScript(
   return terminal
 }
 
+export async function stopJavaProcess(processName: string) {
+  // Stop debugger if running
+  if (os.platform() === 'win32') {
+    // Windows stop debugger if already running
+    child_process.execSync('tskill java 2>nul 1>nul || echo "Java not 
running"')
+  } else {
+    // Linux/Mac stop debugger if already running and make sure script is 
executable
+    child_process.exec(
+      `kill -9 $(ps -ef | grep '${processName}' | grep 'jar' | awk '{ print $2 
}') || return 0`
+    ) // ensure debugger server not running and
+  }
+}

Review Comment:
   we want to limit the amount of deps we add. This is done already whenever we 
start up our own instances however the above code was for ensure a 
daffodil-debugger was not running without knowing the pid. This was only ran in 
one place so removing it shouldn't have much of an effect



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to