Answer by Yuval Adam for How can I keep running a unix program in the...
My preferred method, and arguably the easiest, is using screen:screen -d -m ./myProcess
View ArticleAnswer by user224579 for How can I keep running a unix program in the...
You need to close stdout, stderr, stdin, otherwise you are still bound to that specific TTY./my_script.pl >/dev/null 2>&1 </dev/null &This should do the trick.
View ArticleAnswer by Joanne C for How can I keep running a unix program in the...
use Proc::Daemon;Proc::Daemon::Init;That's what I use for my Sendmail filter program and probably the easiest way to go. The module is available via CPAN.
View ArticleAnswer by artur-pub for How can I keep running a unix program in the...
Snippet is in perldoc perlipc:use POSIX 'setsid';sub daemonize { chdir '/' or die "Can't chdir to /: $!"; open STDIN, '/dev/null' or die "Can't read /dev/null: $!"; open STDOUT, '>/dev/null' or die...
View ArticleAnswer by tommym for How can I keep running a unix program in the background...
Running the job in the background from the shell is fine, depending on how much manual labor you wish to put into making sure it's running continuously.I would use crontab's @reboot (and possibly a...
View ArticleAnswer by Taylor Leese for How can I keep running a unix program in the...
I believe this should work from within your perl script.$SIG{ HUP } = 'IGNORE';Note the man page doc for nohup says:To do this, nohup sets the SIGHUP signal(3) (``terminal line hangup'') to be ignored,...
View ArticleHow can I keep running a unix program in the background even if I log out?
I want to run a Perl script with some while(1) loop in the background on a unix machine until I kill it.This is a remote computer to which I don't have administrative permissions (so for some reason, I...
View Article