Two commands on the same line, ending as on completion

I am trying to write a bash script (for linux) that will start two processes at the same time - a graphical interface and a background process - and will exit both if it either exits. There is a lot of documentation about starting right away (and the ampersand is quite simple), but exiting it does not lead to another exit. Is there any way to do this? Thanks in advance!

For more information: I run two ruby ​​programs. I am working on ubuntu. This is for the kiosk.

+4
source share
1 answer

I used sleep (1) as an example; replace every dream with a ruby ​​run ...

(sleep 5 kill 0)& (sleep 10 kill 0)& wait 
+3
source

Source: https://habr.com/ru/post/1396952/


All Articles