0

Sometimes when my vscode hangs up, and I have to force-quit it, it is as though it will not start back up again until I restart my computer. Before shutting the computer down I tried looking for its id because I had a suspicion that it is already running and that's why it wouldn't start a new window up.

$ ps aux | grep vscode
rtviii     44456  0.0 0.0   8908   656 pts/0    S+  10:21  0:00 grep ... vscode
$ ps aux | grep vscode
rtviii     44459  0.0 0.0   8908   656 pts/0    S+  10:21  0:00 grep ... vscode
...

I discovered that there indeed is this process that looks like vscode although the program itself is not functioning (no window, can't open files, just clicked the icon to no effect).

I tried kill -9ing the process but the system reports that this pid doesn't exist. It seems that every time that I poll for it, it keeps advancing to the higher pid, and that's why I can't pin it down.

Can somebody explain what can be the source of this behavior and how to deal with it?

1
  • 1
    Please don't post pictures of text, just copy/paste a relevant sample of what you're talking about. – Andy Dalton Jul 1 '20 at 17:54
2

The process you're seeing from ps is the grep process you're using to filter for lines containing vscode, not vscode itself. Every time you run it, you're running a new instance of grep so it gets a new pid. You can't kill that process because by the time you go to kill it, grep has already terminated.

See https://unix.stackexchange.com/a/74186/90691

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.