Reputation: 550
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?
Upvotes: 4
Views: 3746
Reputation: 75608
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
Upvotes: 4