R
R
Romi2021-09-18 10:04:24
linux
Romi, 2021-09-18 10:04:24

Is it possible to close the window with VSC from the Linux console and correctly terminate this process in the system?

I continue to automate my workspace :)

I already understood how to run VSC in a bash script - now I want to understand if it is possible to somehow close this window with a command in another script, and correctly kill the process.

In general, the idea is this:

1. One script raises the working environment.

2. Another script to do down her :)

Is it possible to do it somehow? Of course, I do not know the process number in advance.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
R
Romi, 2021-09-18
@romicohen

recipe from xotkot
killall -w code
but without a key is also normal :) Ubuntu does not swear, as
pkill -f code
an answer to this, thank you all!
upd .: I read a little on the topic, it seems to me that in my case the most appropriate would be:
killall -s 2 code
this is how we send SIGINT to the application - i.e. like Ctrl-C :) i.e. kind of from myself.
well I understand that)

A
Alexander, 2021-09-18
@zkelo

pkill -f code

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question