running a process by pipe(c/cpp)