Finally I know what happened to that bug(Segment fault).
The FILE* and the pipepe node is not equal.
Maybe just because I am in Cygwin,and I will test this code in Linux.