This question already has an answer here:
- Where is log file from rc.local? 4 answers
I have a script which is run at startup from
rc.local, I don't redirect the output anywhere.
When I first wrote it, I ran it in a shell, it worked as I expected and continually poured characters out of stdout to the screen so I added
rc.local and didn't think anything more of it.
Recently when I ran a php script at the command line via an SSH shell I noticed when there were connection issues (between my terminal and the SSH server) this meant that stdout from the point of view of the php script had no where to go and the script would get 'stuck' until the connection improved and stdout once again started to flow.
This made me wander if I should actually be directing the output of my startup script somewhere, at least to
/dev/null if I'm not interested in the output.
But the main question is what are the consequences of not doing so? is there some buffer that will become 'clogged' and prevent the script from working or will the output just be ignored?