modify ipc_pipe_open, add a mode argument.