createPipe
Create a pipe for interprocess communication and return a
(readEnd, writeEnd) Handle pair.
When this function is used with WinIO enabled it's the caller's
responsibility to register the handles with the I/O manager. If this
is not done the operation will deadlock. Association can be done as
follows:
#if defined(IO_MANAGER_WINIO)
import GHC.IO.SubSystem ((<!>))
import GHC.IO.Handle.Windows (handleToHANDLE)
import GHC.Event.Windows (associateHandle')
#endif
...
#if defined(IO_MANAGER_WINIO)
return () <!> do
associateHandle' =<< handleToHANDLE readEnd
#endif
Only associate handles that you are in charge of read/writing to. Do
not associate handles passed to another process. It's the process's
responsibility to register the handle if it supports async access.
The
createPipe function creates a pair of connected file
descriptors. The first component is the fd to read from, the second is
the write end. Although pipes may be bidirectional, this behaviour is
not portable and programmers should use two separate pipes for this
purpose. May throw an exception if this is an invalid descriptor.
Create a pipe for interprocess communication and return a
(readEnd, writeEnd) Handle pair.
When this function is used with WinIO enabled it's the caller's
responsibility to register the handles with the I/O manager. If this
is not done the operation will deadlock. Association can be done as
follows:
#if defined(IO_MANAGER_WINIO)
import GHC.IO.SubSystem ((!))
import GHC.IO.Handle.Windows (handleToHANDLE)
import GHC.Event.Windows (associateHandle')
#endif
...
#if defined (IO_MANAGER_WINIO)
return () ! (do
associateHandle' =handleToHANDLE <handle)
#endif
Only associate handles that you are in charge of read/writing to. Do
not associate handles passed to another process. It's the process's
reponsibility to register the handle if it supports async access.
Create a new pipe between this process and the child, and return a
Handle to communicate with the child.
Create a new pipe between this process and the child, and return a
Handle to communicate with the child.
Create a new pipe. The returned Handle will use the default
encoding and newline translation mode (just like Handles
created by openFile).
Deprecated: Use System.Process from package process directly
Create a new pipe for the stream. You get a new
Handle.
Create a pipe for interprocess communication and return a
(readEnd, writeEnd) FD pair.
fromJust for dealing with 'Maybe Handle' values as obtained via
CreatePipe. Creating a pipe using
CreatePipe
guarantees a
Just value for the corresponding handle.