[clug] Launch gnome-terminal to launch daemon process

Hal Ashburner hal.ashburner at gmail.com
Tue Aug 25 03:32:02 UTC 2015


Runs fine if you just run it from a terminal. No different in input or
output so I'd agree that's unlikely to be a cause.

This:

trap "date > /tmp/signal-test" INT HUP QUIT TERM
cmd="exec /usr/bin/python /opt/ark/bin/hgview &"
eval $cmd

also didn't make any difference which makes sense to me as the scrip
will exit very quickly after launching the python so won't be around
to trap the signals.




On 25 August 2015 at 13:18, David Deaves <David.Deaves at dd.id.au> wrote:
>
>
> Most likely method causing your python to exit when the shell does is it
> receiving a SIGHUP when the terminal exits.  You should be able to handle this
> by adding this command before the python command
>
> trap '' 1
>
> may even want to ignore SIGINT also so
>
> trap '' 1 2
>
>
> Another possibility is some IO to the pseudo terminal now failing when it
> goes away - this is less likely to be your issue and normally has the opposite
> effect, calling programs don't exit/carry on until the child program exits.
>
> exec <&-   #  Will close STDIN
> exec >&- 2>&-  # Will close STDOUT - though as you want to see errors from python you probably don't want this
>
>
> Dave !
>
>
>
>
>



More information about the linux mailing list