exec and dead children
Karl Auer
kauer at biplane.com.au
Fri Dec 4 06:56:31 UTC 2015
I have a bash script which starts firefox:
#!/bin/sh
nohup /usr/bin/firefox \
-new-window URL1 \
-new-window UR2 \
[etc] > /dev/null 2>&1 &
/bin/sleep 20
I start this script from a terminal. To avoid having an unused terminal
window hanging around afterwards, and also to avoid having to press
CTL-D, type "exit" or click the close widget, I start this script using
exec:
exec myscript.sh
If I don't put that delay at the end of the script, the new firefox
windows die with the script. Actually, they never really get time to
open. If I don't use nohup, they die regardless of the delay.
Why is this so? Is there some way I can avoid having to insert that
delay?
Regards, K.
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Karl Auer (kauer at biplane.com.au)
http://www.biplane.com.au/kauer
http://twitter.com/kauer389
GPG fingerprint: 3C41 82BE A9E7 99A1 B931 5AE7 7638 0147 2C3C 2AC4
Old fingerprint: EC67 61E2 C2F6 EB55 884B E129 072B 0AF0 72AA 9882
More information about the ubuntu-users
mailing list