Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

nohup process automatically killed in Raspberry Pi machine

Tags:

python

nohup

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?

like image 705
comphilip Avatar asked Sep 02 '25 04:09

comphilip


1 Answers

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
like image 81
konsolebox Avatar answered Sep 04 '25 17:09

konsolebox