Linux Launching another pxplus daemon task

Started by JR, May 20, 2020, 11:11:23 AM

Previous topic - Next topic

JR

Hi,
When launching my pxplus ATHENA daemon with command :
A=SYS("cd $home;export TERM=IO;"+ARG(0)+" ATHENA >/dev/null 2>/dev/null &")
and if I exit the current task, the ATHENA child is stopped.

But if i do it manually :
A=SYS("bash")
and
me@server:/tmp/pvx$ cd $home;export TERM=IO;/home/pxplus/pxplus ATHENA >/dev/null 2>/dev/null &
the ATHENA daemon still runs when I exit current ubuntu session.
I do not want the daemon to stop.
Any idea ?

Mike King

When you exit the parent task are you exiting the Linux session back to logon?  If so then you need to add 'nohup' or 'setsid' in front of pathname of the Executable (arg0) that you are running.  This prevents the SIGHUP from being sent to the child processes.
Mike King
President - BBSysco Consulting - http://www.bbsysco.com
eMail: mike.king@bbsysco.com

JR

Hi,
Thanks. Unfortunately on my Ubuntu, adding nohup or setsid is no help. Logging out kills the child anyway for unknown reason.
I finally ended getting around the problem with "at" unix command.

A=SYS("at now -f /tmp/pvx/cmd")

and the cmd file containing :

cd $home;export TERM=IO;/home/pxplus/pxplus ATHENA >/dev/null

My problem is solved.