Terminate context in a child process of fork() to replace file descriptors…

Terminate context in a child process of fork() to replace file descriptors to not interfere with parent process's context.