pipe syscall implementation