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
9467dfaa
Commit
9467dfaa
authored
May 10, 2001
by
Fred Drake
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update to reflect deprecation of the FCNTL module: The fcntl module does
*not* define O_RDWR; get that from the os module.
parent
ef5b1e78
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
Lib/pty.py
Lib/pty.py
+4
-4
No files found.
Lib/pty.py
View file @
9467dfaa
...
...
@@ -7,7 +7,7 @@
# Author: Steen Lumholt -- with additions by Guido.
from
select
import
select
import
os
,
FCNTL
import
os
import
tty
__all__
=
[
"openpty"
,
"fork"
,
"spawn"
]
...
...
@@ -55,7 +55,7 @@ def _open_terminal():
pass
else
:
try
:
tty_name
,
master_fd
=
sgi
.
_getpty
(
FCNTL
.
O_RDWR
,
0666
,
0
)
tty_name
,
master_fd
=
sgi
.
_getpty
(
os
.
O_RDWR
,
0666
,
0
)
except
IOError
,
msg
:
raise
os
.
error
,
msg
return
master_fd
,
tty_name
...
...
@@ -63,7 +63,7 @@ def _open_terminal():
for
y
in
'0123456789abcdef'
:
pty_name
=
'/dev/pty'
+
x
+
y
try
:
fd
=
os
.
open
(
pty_name
,
FCNTL
.
O_RDWR
)
fd
=
os
.
open
(
pty_name
,
os
.
O_RDWR
)
except
os
.
error
:
continue
return
(
fd
,
'/dev/tty'
+
x
+
y
)
...
...
@@ -75,7 +75,7 @@ def slave_open(tty_name):
opened filedescriptor.
Deprecated, use openpty() instead."""
return
os
.
open
(
tty_name
,
FCNTL
.
O_RDWR
)
return
os
.
open
(
tty_name
,
os
.
O_RDWR
)
def
fork
():
"""fork() -> (pid, master_fd)
...
...
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