Reputation:
Is there a native way to keep a perl script running on a server(uninterrupted by ssh disconnections) without the use of tools like tmux and screen ? I am using Ubuntu.
Upvotes: 0
Views: 319
Reputation: 17131
You can try the POSIX command nohup
Most shells also come with disown
As far as a perl native solution, you can simply use the signal handling features of perl.
$SIG{HUP} = sub {
print "got SIGHUP\n";
};
Upvotes: 4