Issue
I have a Raspberry Pi running Raspbian OS.
After login via SSH, I ran a python script via nohup:
nohup python3 start.py </dev/null >/dev/null &
Then I logout. The python process was still running.
But after two days or several days, the python process was end. There is no error in log.
Can anyone give me some tips?
Solution
Try redirecting stderr
as well:
nohup python3 start.py </dev/null >/dev/null 2>&1 &
Also I don't think this is really helpful but just add disown
anyway:
nohup python3 start.py </dev/null >/dev/null 2>&1 &
disown
Answered By - konsolebox Answer Checked By - Willingham (WPSolving Volunteer)