cleanup stdout/stderr collection threads after forked process returns