I have a server script that runs mysqld and forks to continue running. As an example:
./mysqld <parameters> &
echo "Parent runs next line in script."
<do more stuff>
Why does tee wait for the child process to end before it ends itself?
EDIT:
For example, the following always hangs:
./myscript | tee -a logfile.log