I am using the following command to run a python script in the background:
nohup ./cmd.py > cmd.log &
But it appears that nohup is not writing anything to the log file. cmd.log is created but is always empty. In the python script, I am using sys.stdout.write
instead of print
to print to standard output. Am I doing anything wrong?
nohup
are you using? The BSD version writes to a file callednohup.out
in the current directory (or$HOME/nohup.out
if the current directory isn't writable). I don't see a way to change the output file name...