Method Stdio.File()->pipe()
- Method
pipe
Filepipe(void|intrequired_properties)- Description
This function creates a pipe between the object it was called in and an object that is returned.
- Parameter
required_properties Binary or (`|()) of required
PROP_properties.PROP_IPCThe resulting pipe may be used for inter process communication.
PROP_NONBLOCKThe resulting pipe supports nonblocking I/O.
PROP_SHUTDOWNThe resulting pipe supports shutting down transmission in either direction (see close()).
PROP_BUFFEREDThe resulting pipe is buffered (usually 4KB).
PROP_BIDIRECTIONALThe resulting pipe is bi-directional.
PROP_SEND_FDThe resulting pipe might support sending of file descriptors (see send_fd() and
receive_fd()for details).PROP_REVERSEThe resulting pipe supports communication "backwards" (but not necessarily "forwards", see
PROP_BIDIRECTIONAL).The default is
PROP_NONBLOCK|PROP_BIDIRECTIONAL.If
PROP_BIDIRECTIONALisn't specified, the read-end is this object, and the write-end is the returned object (unlessPROP_REVERSEhas been specified, in which case it is the other way around).The two ends of a bi-directional pipe are indistinguishable.
If the File object this function is called in was open to begin with, it will be closed before the pipe is created.
- Note
Calling this function with an argument of 0 is not the same as calling it with no arguments.
- See also
Process.create_process(), send_fd(),
receive_fd(),PROP_IPC,PROP_NONBLOCK,PROP_SEND_FD,PROP_SHUTDOWN,PROP_BUFFERED,PROP_REVERSE,PROP_BIDIRECTIONAL