Jump to content

Coprocess

From Wikipedia, the free encyclopedia
This is the current revision of this page, as edited by Boleyn (talk | contribs) at 08:55, 19 July 2025 (has ref). The present address (URL) is a permanent link to this version.
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)

In computer science, a coprocess is a process that explicitly yields control to other processes or the operating system.

In Unix, a coprocess is a process that sends its output solely to the exact single process from which it solely received input.

Bash, BETA, ksh, and Zsh[1] have language constructs for coprocesses.

See also

[edit]


References

[edit]
  1. ^ "6.1 Simple Commands & Pipelines". The Z Shell Manual (Version 5.9 ed.). 14 May 2022. Retrieved 13 July 2025. If a pipeline is preceded by 'coproc', it is executed as a coprocess; a two-way pipe is established between it and the parent shell. The shell can read from or write to the coprocess by means of the '>&p' and '<&p' redirection operators or with 'print -p' and 'read -p'. A pipeline cannot be preceded by both 'coproc' and '!'. If job control is active, the coprocess can be treated in other than input and output as an ordinary background job.
[edit]