Process killed during close ssh session, how prevent such thing
DebianThis forum is for the discussion of Debian Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Process killed during close ssh session, how prevent such thing
I use Debian 8 on ARM V7 system. I run some program that should run for long period of time. I start them from SSH connection ( no other way to do ) . After I close SSH session process I started is killed .
How can I prevent such thing ?
I heard about nohup .How is the best way use it ? Maybe there is other applications that preffered for such things
Note that this will open up an output file "nohup.out" that contains the output from the program which you have started. Depending on what the program outputs, this might get uncomfortably large at some point.
If this program is interactive, though, you might want to use something like "screen" instead.
I run Wildfly and it output file names / max size / number of files before rolling didn't work while I use nohup even if I declare same path for output. You mention something about screen do you know more details about it?
anthony@miranda:~$ apt-cache show screen
Package: screen
Version: 4.4.0-6
Installed-Size: 981
Maintainer: Axel Beckert <abe@debian.org>
Architecture: amd64
Depends: libc6 (>= 2.15), libpam0g (>= 0.99.7.1), libtinfo5 (>= 6)
Suggests: byobu | screenie | iselect (>= 1.4.0-1), ncurses-term
Description-en: terminal multiplexer with VT100/ANSI terminal emulation
GNU Screen is a terminal multiplexer that runs several separate "screens" on
a single physical character-based terminal. Each virtual terminal emulates a
DEC VT100 plus several ANSI X3.64 and ISO 2022 functions. Screen sessions
can be detached and resumed later on a different terminal.
.
Screen also supports a whole slew of other features, including configurable
input and output translation, serial port support, configurable logging,
and multi-user support.
Description-md5: 2d86b86ed6058a04c540802e49312f40
Homepage: https://savannah.gnu.org/projects/screen
Tag: hardware::input:keyboard, implemented-in::c, interface::text-mode,
role::program, scope::utility, suite::gnu, uitoolkit::ncurses,
works-with::software:running
Section: misc
Priority: optional
Filename: pool/main/s/screen/screen_4.4.0-6_amd64.deb
Size: 597136
As stated above, one of the greatest benefits of screen is that you can detach, close your ssh session, and then reattach to that screen session later on, picking up exactly where you left off - even from a different remote workstation.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.