FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
node/lib/tty.js at pointer_bindings · tmpvar/node · GitHub
tmpvar
/
node
Public
forked from
nodejs/node-v0.x-archive
Notifications
You must be signed in to change notification settings
Fork
0
Star
1
Code
Pull requests
0
Actions
Projects
Wiki
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
node
/
lib
/
tty.js
Copy path
More file actions
More file actions
Latest commit
History
History
History
38 lines (24 loc) · 732 Bytes
Breadcrumbs
node
/
lib
/
tty.js
Copy path
File metadata and controls
38 lines (24 loc) · 732 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
var
spawn
=
require
(
'child_process'
)
.
spawn
;
var
binding
=
process
.
binding
(
'stdio'
)
;
exports
.
isatty
=
binding
.
isatty
;
exports
.
setRawMode
=
binding
.
setRawMode
;
exports
.
getWindowSize
=
binding
.
getWindowSize
;
exports
.
setWindowSize
=
binding
.
setWindowSize
;
exports
.
open
=
function
(
path
,
args
)
{
var
fds
=
binding
.
openpty
(
)
;
var
slaveFD
=
fds
[
0
]
;
var
masterFD
=
fds
[
1
]
;
var
env
=
{
TERM
:
'vt100'
}
;
for
(
var
k
in
process
.
env
)
{
env
[
k
]
=
process
.
env
[
k
]
;
}
var
stream
=
require
(
'net'
)
.
Stream
(
slaveFD
)
;
stream
.
readable
=
stream
.
writable
=
true
;
stream
.
resume
(
)
;
child
=
spawn
(
path
,
args
,
{
env
:
env
,
customFds
:
[
masterFD
,
masterFD
,
masterFD
]
,
setuid
:
true
}
)
;
return
[
stream
,
child
]
;
}
;
Back
|
FazBrowse Home
|
New Git URL