Re: background process

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 20Dec2018 15:16, Dave Stevens <geek@xxxxxxxxxxxx> wrote:
On Thu, 20 Dec 2018 23:10:47 +0000
Rick Stevens <ricks@xxxxxxxxxxxxxx> wrote:
I am not sure that a standard background process (using &) is not
going to
> kill the process when I logout.

Make sure you have the screen RPM installed on the remote machine,
then you can run the command in a screen session:

	remote-machine> screen -d -m -S SomeIdentifier <command>
<args>

yes I use screen this way routinely, works fine.

I use tmux instead of screen, but yes this is my usual practice too. Give your session a meaningful name, it will be handy later.

The recipes recited kick off a command already "detached" (running in screen, but don't leave you connected). I generally open a named session and start the command interactively. That lets me see it get under way and lets me handle minor mistakes. And its in a shell ready to be interrupted, suspended, restarted, whatever.

I do this so routinely that I've got an alias "@" which runs an elaborate shell function, so I go:

 @ remotehost:SESSION_NAME

whih sshes into remotehost in a tmux session named "SESSION_NAME". Once it's good, just detach.

And it records the host and session in the local shell. So if I've just got a shell lurking on my never-shut-down laptop, I kick that off. And later, in that same shell, just type "@" to reconnect to the same session.

Cheers,
Cameron Simpson <cs@xxxxxxxxxx>
_______________________________________________
users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/users@xxxxxxxxxxxxxxxxxxxxxxx



[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux