You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Open a Java project in VS Code, wait for the projects to be imported, and then click x button to close VS Code Window. Java extension is supposed to detect parent process exit and shutdown itself. Actually the log shows the ParentProcessWatcher didn't work.
!ENTRY org.eclipse.jdt.ls.core 4 0 2022-05-31 21:04:11.286
!MESSAGE Cannot run program "kill": error=316, posix_spawn failed
!STACK 0
java.io.IOException: Cannot run program "kill": error=316, posix_spawn failed
at java.base/java.lang.ProcessBuilder.start(Unknown Source)
at java.base/java.lang.ProcessBuilder.start(Unknown Source)
at java.base/java.lang.Runtime.exec(Unknown Source)
at java.base/java.lang.Runtime.exec(Unknown Source)
at java.base/java.lang.Runtime.exec(Unknown Source)
at org.eclipse.jdt.ls.core.internal.ParentProcessWatcher.parentProcessStillRunning(ParentProcessWatcher.java:77)
at org.eclipse.jdt.ls.core.internal.ParentProcessWatcher.run(ParentProcessWatcher.java:49)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.base/java.util.concurrent.FutureTask.runAndReset(Unknown Source)
at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.base/java.lang.Thread.run(Unknown Source)
Caused by: java.io.IOException: error=316, posix_spawn failed
at java.base/java.lang.ProcessImpl.forkAndExec(Native Method)
at java.base/java.lang.ProcessImpl.<init>(Unknown Source)
at java.base/java.lang.ProcessImpl.start(Unknown Source)
... 13 more
The text was updated successfully, but these errors were encountered:
An alternative approach is to use JDK ProcessHandle API. It supports getting a ProcessHandle from a pid, and listening at its exit event via ProcessHandle.onExit().
OS: macOS Catalina
vscode-java: 1.6.0
Open a Java project in VS Code, wait for the projects to be imported, and then click
x
button to close VS Code Window. Java extension is supposed to detect parent process exit and shutdown itself. Actually the log shows the ParentProcessWatcher didn't work.The text was updated successfully, but these errors were encountered: