I have this script.sh where I pass the path to the binaries, all apps run in the background:
./script.sh path/to/app_1 path/to/app_2 ... path/to/app_n
Here is the script:
#!/bin/bash for app in "$@" do $app & done
All my apps are running as I expected. Some of them are just console applications without windows, but some apps have interface and I can close the window app.
I can get pid of the app, something like this:
How to kill all apps by pids that I passed through script.bash as arguments? When I close one of the windows it should kill all known running apps.