Gets a GHC Handle File description from the given OS Handle or POSIX fd.
A CommunicationHandle is an abstraction over operating-system specific internal representation of a Handle, which can be communicated through a command-line interface.
In a typical use case, the parent process creates a pipe, using e.g.
createWeReadTheyWritePipe or createTheyReadWeWritePipe.
One end of the pipe is a Handle, which can be read from/written to by the parent process.
The other end is a CommunicationHandle, which can be inherited by a child process. A reference to the handle can be serialised (using the Show instance), and passed to the child process. It is recommended to close the parent's reference to the CommunicationHandle using closeCommunicationHandle after it has been inherited by the child process.
The child process can deserialise the CommunicationHandle (using the Read instance), and then use
openCommunicationHandleWriteoropenCommunicationHandleReadin order to retrieve a Handle which it can write to/read from.
readCreateProcessWithExitCodeCommunicationHandle provides a high-level API
to this functionality. See there for example code.
Constructors
Instances4Eq, Ord, Read, Show
Eq CommunicationHandleDefined in process-1.6.26.1 · System.Process.CommunicationHandle.InternalOrd CommunicationHandleDefined in process-1.6.26.1 · System.Process.CommunicationHandle.InternalRead CommunicationHandleDefined in process-1.6.26.1 · System.Process.CommunicationHandle.InternalShow CommunicationHandleDefined in process-1.6.26.1 · System.Process.CommunicationHandle.Internal