comphilip
comphilip

Reputation: 550

nohup process automatically killed in Raspberry Pi machine

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

Answers (1)

konsolebox
konsolebox

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

Related Questions