如何允许后台进程在会话终止后继续存在?
How to allow backgrounding a process to survive a session termination?
所以我在后台使用 Putty 会话 运行 脚本。
我的脚本可以通过
找到
cd /var/www/listingapp
.
那我就运行命令
php /var/www/listingapp/public/index.php batch/GetPrefecture init > /dev/null &
所以我希望脚本会在后台运行,但是在我关闭 putty CLI 并尝试重新打开它之后,输入命令时无法再找到该进程
ps aux | grep /var/www/listingapp
所以这意味着它停止了。会话终止后如何在后台进入 运行?
nohup php /var/www/listingapp/public/index.php batch/GetPrefecture init &
所以我在后台使用 Putty 会话 运行 脚本。
我的脚本可以通过
找到cd /var/www/listingapp
.
那我就运行命令
php /var/www/listingapp/public/index.php batch/GetPrefecture init > /dev/null &
所以我希望脚本会在后台运行,但是在我关闭 putty CLI 并尝试重新打开它之后,输入命令时无法再找到该进程
ps aux | grep /var/www/listingapp
所以这意味着它停止了。会话终止后如何在后台进入 运行?
nohup php /var/www/listingapp/public/index.php batch/GetPrefecture init &