Skip to content

Commit

Permalink
Merge pull request JuliaLang#14298 from mbaz/patch-3
Browse files Browse the repository at this point in the history
Add doc for `open(::Cmd)` to section on I/O and Networking
  • Loading branch information
jakebolewski committed Dec 8, 2015
2 parents 64bc798 + 9608bb6 commit f4c8c02
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 21 deletions.
21 changes: 0 additions & 21 deletions doc/stdlib/base.rst
Original file line number Diff line number Diff line change
Expand Up @@ -799,27 +799,6 @@ System
Send a signal to a process. The default is to terminate the process.

.. function:: open(command, mode::AbstractString="r", stdio=DevNull)

.. Docstring generated from Julia source
Start running ``command`` asynchronously, and return a tuple
``(stream,process)``. If ``mode`` is ``"r"``, then ``stream``
reads from the process's standard output and ``stdio`` optionally
specifies the process's standard input stream. If ``mode`` is
``"w"``, then ``stream`` writes to the process's standard input
and ``stdio`` optionally specifies the process's standard output
stream.

.. function:: open(f::Function, command, mode::AbstractString="r", stdio=DevNull)

.. Docstring generated from Julia source
Similar to ``open(command, mode, stdio)``, but calls ``f(stream)``
on the resulting read or write stream, then closes the stream
and waits for the process to complete. Returns the value returned
by ``f``.

.. function:: Sys.set_process_title(title::AbstractString)

.. Docstring generated from Julia source
Expand Down
20 changes: 20 additions & 0 deletions doc/stdlib/io-network.rst
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,26 @@ General I/O
a+ read, write, create, append
==== =================================

.. function:: open(command, mode::AbstractString="r", stdio=DevNull)

.. Docstring generated from Julia source
Start running ``command`` asynchronously, and return a tuple
``(stream,process)``. If ``mode`` is ``"r"``, then ``stream``
reads from the process's standard output and ``stdio`` optionally
specifies the process's standard input stream. If ``mode`` is
``"w"``, then ``stream`` writes to the process's standard input
and ``stdio`` optionally specifies the process's standard output
stream.

.. function:: open(f::Function, command, mode::AbstractString="r", stdio=DevNull)

.. Docstring generated from Julia source
Similar to ``open(command, mode, stdio)``, but calls ``f(stream)``
on the resulting read or write stream, then closes the stream
and waits for the process to complete. Returns the value returned
by ``f``.

.. function:: open(f::Function, args...)

Expand Down

0 comments on commit f4c8c02

Please sign in to comment.