Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve documentation for process interaction using pipes #24810

Open
4 tasks
mbaz opened this issue Nov 27, 2017 · 3 comments
Open
4 tasks

Improve documentation for process interaction using pipes #24810

mbaz opened this issue Nov 27, 2017 · 3 comments
Labels
domain:docs This change adds or pertains to documentation domain:io Involving the I/O subsystem: libuv, read, write, etc.

Comments

@mbaz
Copy link
Contributor

mbaz commented Nov 27, 2017

Current documentation covers some aspects of launching processes and interacting with them using STDIN and STDOUT. However, Julia has much more powerful capabilities that remain largely undocumented. In particular, concurrent use of the three standard process streams STDIN, STDOUT and STDERR is not documented.

See previous discussion here (and links therein).

In addition, there are several ways to acomplish this kind of iteration. It has been suggested that some of these may be deprecated in favor of pipeline.

These are the suggested tasks:

  • Document Pipe() (Deprecate readandwrite and add docs for Pipe #24718)

  • Deprecate or document four-argument spawn. Example:

    julia> stdin, stdout, stderr = (Pipe() for _ in 1:3);
    julia> spawn(`cat`, stdin, stdout, stderr)
    
  • Deprecate or document use of pipeline with three pipes. Example:

    julia> stdin, stdout, stderr = (Pipe() for _ in 1:3);
    julia> pipeline(`cat`, stdin=stdin, stdout=stdout, stderr=stderr)
    
  • Deprecate or document use of pipeline with one pipe. This involves also documenting that the objects returned by open allow access to the pipes (is this also true of spawn?) Example (not supported in v0.6):

    julia> p = open(pipeline(`cat`; stderr=Pipe()), "r+")
    # Use p.{in,out,err} to access
    
@vtjnash
Copy link
Sponsor Member

vtjnash commented Nov 27, 2017

I think we should consider deprecating some of the calls that take a specific number of pipes, since pipeline is much more general.

@JeffBezanson JeffBezanson added domain:docs This change adds or pertains to documentation domain:io Involving the I/O subsystem: libuv, read, write, etc. labels Nov 27, 2017
@mbaz
Copy link
Contributor Author

mbaz commented Dec 1, 2017

@vtjnash I updated the proposed task list.

@fingolfin
Copy link
Contributor

Note that while Pipe now has a doc string, it does not seem to be part of the manual yet -- or at least I can't find it, see https://docs.julialang.org/en/v1/search/?q=Pipe

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
domain:docs This change adds or pertains to documentation domain:io Involving the I/O subsystem: libuv, read, write, etc.
Projects
None yet
Development

No branches or pull requests

4 participants