ProcessConnection[proc,"stream"]
returns the stream object for a given stream.
ProcessConnection
ProcessConnection[proc,"stream"]
returns the stream object for a given stream.
Examples
Basic Examples (2)
Start the system shell process:
process = StartProcess[$SystemShell]WriteLine[process, "echo some text for standard output"];Read the shell command output:
ReadLine[process]Write an invalid shell command:
WriteLine[process, "invalid command"];Use ProcessConnection to read from the standard error stream:
ReadLine[ProcessConnection[process, "StandardError"]]Start the system shell process:
process = StartProcess[$SystemShell]Get the standard input stream using ProcessConnection:
input = ProcessConnection[process, "StandardInput"]Get the standard output stream using ProcessConnection:
output = ProcessConnection[process, "StandardOutput"]Write two commands into the shell. A process and its streams can be used interchangeably in most cases:
WriteLine[input, "echo line 1"];WriteLine[process, "echo line 2"];ReadLine[process]ReadLine[output]See Also
Related Guides
History
Text
Wolfram Research (2014), ProcessConnection, Wolfram Language function, https://reference.wolfram.com/language/ref/ProcessConnection.html.
CMS
Wolfram Language. 2014. "ProcessConnection." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/ProcessConnection.html.
APA
Wolfram Language. (2014). ProcessConnection. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/ProcessConnection.html
BibTeX
@misc{reference.wolfram_2026_processconnection, author="Wolfram Research", title="{ProcessConnection}", year="2014", howpublished="\url{https://reference.wolfram.com/language/ref/ProcessConnection.html}", note=[Accessed: 13-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_processconnection, organization={Wolfram Research}, title={ProcessConnection}, year={2014}, url={https://reference.wolfram.com/language/ref/ProcessConnection.html}, note=[Accessed: 13-June-2026]}