I am having problems starting a python script in rc.local. Looking into the problem it looks as if I am not even able to launch my script in the background.
My very simple python script called test.py contains:
#!/usr/bin/python
import sys
import time
while True:
print "Hoi"
time.sleep(1)
When on the Linino command line I do:
./test.py > /tmp/a.log
I see the file a.log in /tmp being created and filled, but it 'consumes' my terminal.
When I do:
./test.py > /tmp/x.log &
I can see (using top) that the test.py process is running. However, the file /tmp/x.log remains empty (it does get created). Also after killing the test.py process the file is still empty.
Any idea what I am doing wrong?