I have a very simple problem. A python script starting with the following:
import sys
sys.stdout = open("server.out", 'w')
If I enter this command directly to the terminal
python start_server.py &
It writes the server.out
file.
If I enter service tdserver start
, all the init.d
script does is this:
python start_server.py &
The same command, nothing else. Yet, in this case the stdout doesnt get written to server.out
Why? No processes have lock on the file, confirmed that the script is stopped with ps -aux