I have a pubsub python script. When I run the receiver script and send to the background using
&, and close the ssh session, the process is killed.
Is there any way to run receiver all the time?
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It only takes a minute to sign up.Sign up to join this community
Welcome to U&L.
This might be of help: Why does my Python background process end when SSH session is terminated?
BTW: starting a process in the shell and counting on it to stay available is not the recommended way to go. Have you considered writing a custom systemd service unit file to accomodate background service behaviour?
A quick search gives for example: https://tecadmin.net/setup-autorun-python-script-using-systemd/