Fix bug: require fflush() before fork() to avoid data corruption.