mirror of
https://github.com/python/cpython.git
synced 2024-11-28 20:33:54 +08:00
Thomas Wouters <thomas@xs4all.net>:
Documentation updates related to the addition of openpty() and forkpty().
This commit is contained in:
parent
4e5302a27e
commit
c82634c13c
@ -367,6 +367,14 @@ object'' with \method{read()} and \method{write()} methods (and many
|
|||||||
more).
|
more).
|
||||||
\end{funcdesc}
|
\end{funcdesc}
|
||||||
|
|
||||||
|
\begin{funcdesc}{openpty}{}
|
||||||
|
Open a new pseudo-terminal pair. Return a pair of file descriptors
|
||||||
|
\code{(\var{master}, \var{slave})} for the pty and the tty,
|
||||||
|
respectively. For a (slightly) more portable approach, use the
|
||||||
|
\refmodule{pty}\refstmodindex{pty} module.
|
||||||
|
Availability: Some flavors of \UNIX{}
|
||||||
|
\end{funcdesc}
|
||||||
|
|
||||||
\begin{funcdesc}{pipe}{}
|
\begin{funcdesc}{pipe}{}
|
||||||
Create a pipe. Return a pair of file descriptors \code{(\var{r},
|
Create a pipe. Return a pair of file descriptors \code{(\var{r},
|
||||||
\var{w})} usable for reading and writing, respectively.
|
\var{w})} usable for reading and writing, respectively.
|
||||||
@ -791,6 +799,16 @@ process id in the parent.
|
|||||||
Availability: \UNIX{}.
|
Availability: \UNIX{}.
|
||||||
\end{funcdesc}
|
\end{funcdesc}
|
||||||
|
|
||||||
|
\begin{funcdesc}{forkpty}{}
|
||||||
|
Fork a child process, using a new pseudo-terminal as the child's
|
||||||
|
controlling terminal. Return a pair of \code{(\var{pid}, \var{fd})},
|
||||||
|
where \var{pid} is \code{0} in the child, the new child's process id
|
||||||
|
in the parent, and \code{fd} is the file descriptor of the master end
|
||||||
|
of the pseudo-terminal. For a more portable approach, use the
|
||||||
|
\refmodule{pty} module.
|
||||||
|
Availability: Some flavors of \UNIX{}
|
||||||
|
\end{funcdesc}
|
||||||
|
|
||||||
\begin{funcdesc}{kill}{pid, sig}
|
\begin{funcdesc}{kill}{pid, sig}
|
||||||
\index{process!killing}
|
\index{process!killing}
|
||||||
\index{process!signalling}
|
\index{process!signalling}
|
||||||
|
@ -26,6 +26,13 @@ descriptor connected to the child's controlling terminal (and also
|
|||||||
to the child's standard input and output.
|
to the child's standard input and output.
|
||||||
\end{funcdesc}
|
\end{funcdesc}
|
||||||
|
|
||||||
|
\begin{funcdesc}{openpty}{}
|
||||||
|
Open a new pseudo-terminal pair, using \function{os.openpty()} if
|
||||||
|
possible, or emulation code for SGI and generic \UNIX{} systems.
|
||||||
|
Return a pair of file descriptors \code{(\var{master}, \var{slave})},
|
||||||
|
for the master and the slave end, respectively.
|
||||||
|
\end{funcdesc}
|
||||||
|
|
||||||
\begin{funcdesc}{spawn}{argv\optional{, master_read\optional{, stdin_read}}}
|
\begin{funcdesc}{spawn}{argv\optional{, master_read\optional{, stdin_read}}}
|
||||||
Spawn a process, and connect its controlling terminal with the current
|
Spawn a process, and connect its controlling terminal with the current
|
||||||
process's standard io. This is often used to baffle programs which
|
process's standard io. This is often used to baffle programs which
|
||||||
|
Loading…
Reference in New Issue
Block a user