Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
a4b5d587
Commit
a4b5d587
authored
Jun 29, 1999
by
Fred Drake
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pty documentation from Moshe; with small edits.
parent
31d10cbe
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
41 additions
and
0 deletions
+41
-0
Doc/lib/libpty.tex
Doc/lib/libpty.tex
+41
-0
No files found.
Doc/lib/libpty.tex
0 → 100644
View file @
a4b5d587
%%%% LaTeX'ed and enhanced from comments in file
%%%% Skipped some functions which seemed to be for private
%%%% usage (decision debatable).
\section
{
\module
{
pty
}
---
Pseudo-terminal utilities
}
\declaremodule
{
standard
}{
pty
}
\platform
{
IRIX, Linux
}
%XXX Is that the right way???
\modulesynopsis
{
Pseudo-Terminal Handling for SGI and Linux.
}
\moduleauthor
{
Steen Lumholt
}{}
\sectionauthor
{
Moshe Zadka
}{
mzadka@geocities.com
}
The
\module
{
pty
}
module defines operations for handling the
pseudo-terminal concept: starting another process and being able to
write to and read from its controlling terminal programmatically.
Because pseudo-terminal handling is highly platform dependant, there
is code to do it only for SGI and Linux. (The Linux code is supposed
to work on other platforms, but hasn't been tested yet.)
The
\module
{
pty
}
module defines the following functions:
\begin{funcdesc}
{
fork
}{}
Fork. Connect the child's controlling terminal to a pseudo-terminal.
Return value is
\code
{
(
\var
{
pid
}
,
\var
{
fd
}
)
}
. Note that the child
gets
\var
{
pid
}
0, and the
\var
{
fd
}
is
\emph
{
invalid
}
. The parent's
return value is the
\var
{
pid
}
of the child, and
\var
{
fd
}
is a file
descriptor connected to the child's controlling terminal (and also
to the child's standard input and output.
\end{funcdesc}
\begin{funcdesc}
{
spawn
}{
argv
\optional
{
, master
_
read
\optional
{
, stdin
_
read
}}}
Spawn a process, and connect its controlling terminal with the current
process's standard io. This is often used to baffle programs which
insist on reading from the controlling terminal.
The functions
\var
{
master
_
read
}
and
\var
{
stdin
_
read
}
should be
functions which read from a file-descriptor. The defaults try to read
1024 bytes each time they are called.
\end{funcdesc}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment