Tried to open an Out named pipe from Powershell
$pipe = new-object System.IO.Pipes.NamedPipeServerStream 'testpipe','Out'
$pipe.WaitForConnection()
$sw = new-object System.IO.StreamWriter $pipe
$sw.AutoFlush = $true
$sw.WriteLine("Server pid is $pid")
$sw.Dispose()
$pipe.Dispose()
and use Get
to read the named pipe.
Get["\\\\.\\pipe\\testpipe"]
The following messages were shown in Powershell and Mathematica
Exception calling "WriteLine" with "1" argument(s): "Pipe is broken."
At line:5 char:1
+ $sw.WriteLine("Server pid is $pid")
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : IOException
Exception calling "Dispose" with "0" argument(s): "Pipe is broken."
At line:6 char:1
+ $sw.Dispose()
+ ~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : IOException
Get::noopen: Cannot open \\.\pipe\testpipe.