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


##########
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:
   Yeah this was mostly used for the daffodil-debugger to make sure another 
instance of it is running, but you are correct with the addition of omega-edit 
this could possibly trample that omega-edit instance if running. I would be 
also for removing this. @mbeckerle @stevedlawrence Do you think this would be 
good to actually remove?



-- 
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