fork process and read/write through pipe