Sublime Forum

Obtain process id of plugin_host.exe

#1

Is there any way to get the process id of plugin_host.exe? I am trying to fix a bug with the LSP plugin where it is passing the wrong process id to the language server. It is supposed to pass the process id of the parent process so the language server can shut itself down when its parent terminates. The plugin launches the language server, so the parent process is plugin_host.exe.

0 Likes

#2

Ah. I figured it out.

import os
os.getpid()

Returns the pid of plugin_host.exe.

1 Like