0

How is script of Bash separating, closing itself from a launching of executable binary in fork, ie. form eg. $ sed & exit at the very beginning of Bash launched itself on a terminal launcher (eg. Xfce)

xfce4-terminal  --execute bash --rcfile ini.sh 

That's not work, this issue may be only rare on specific case of: binary executed by binary , i.e. Wine use

Done in no script, of course as usual, will work

$ cat ini.sh

cd /home/$USER/.wine/drive_c/shamela4; LC_ALL=ar_SA.UTF-8 wine64 app/win/64/bin/shamela.exe & exit

nor with ... &{ sleep 17; exit ;}

it'll close altogether the Bash and the running executable binaries else
Please shed a light what actually is going on t

1 Answers1

0

You need to detach the process you want to keep running in the background after closing the terminal ... In Bash this can be done with the shell builtin disown. So, for example; you can do something like this in the terminal:

cd /home/$USER/.wine/drive_c/shamela4; LC_ALL=ar_SA.UTF-8 wine64 app/win/64/bin/shamela.exe & disown; exit

... and keep your process running after closing the terminal.

For explanation, please see Command dependent on background job finishing

Raffa
  • 32,237