exec and dead children
Karl Auer
kauer at biplane.com.au
Fri Dec 4 09:07:33 UTC 2015
On Fri, 2015-12-04 at 08:46 +0100, Nils Kassube wrote:
> Nils Kassube wrote:
> Sorry, forget about the "wait" command - it doesn't work.
Yes, I know, I was tactfully ignoring that advice :-)
> However there is a way that does work:
> #!/bin/sh
> firefox $ARGS <&- >&- 2>- &
Well, that's new to me, I have not seen that syntax before. However, it
doesn't work for me.
With or without nohup, whether redirecting as you suggest or redirecting
to a file or redirecting to /dev/null, I still need a delay or
everything dies. Without nohup everything dies anyway.
without nohup, with standard redirections, no delay
- everything dies when script finishes
with nohup, with standard redirections, no delay
- everything dies when script finishes
without nohup, with standard redirections, with delay
- everything dies when script finishes
with nohup, with standard redirections, with delay
- everything OK
without nohup, with your redirections, no delay
- everything dies
with nohup, with your redirections, no delay
- everything dies
without nohup, with your redirections, with delay
- everything dies
with nohup, with your redirections, with delay
- everything OK
Here is my working script (except that the firefoxcommand is all on one
line)
#!/bin/sh
nohup /usr/bin/firefox \
-new-window URL1 \
-new-window URL2 \
> /dev/null 2>&1 &
/bin/sleep 20
Did you perhaps have a firefox window already open when you exec-ed your
script? If you did, it will work - with or without nohup, and with or
without a delay.
I also found that firefox would sometimes not start at all when I used
your redirections - not always, but every now and then I would have to
start it in safe mode.
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