Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
emulab
emulab-devel
Commits
5aa6d964
Commit
5aa6d964
authored
Jan 02, 2001
by
Mike Hibler
Browse files
Yes I'm an idiot: took me three tries to get opening a pty in non-blocking
mode correct. It works now. Really.
parent
276f492f
Changes
1
Hide whitespace changes
Inline
Side-by-side
capture/capture.c
View file @
5aa6d964
...
...
@@ -514,7 +514,16 @@ shutdown(int sig)
if
((
ptyfd
=
open
(
Ptyname
,
O_RDWR
,
0666
))
<
0
)
die
(
"open(%s) : %s"
,
Ptyname
,
geterr
(
errno
));
dup2
(
ptyfd
,
ofd
);
/* XXX so we don't have to recompute the select mask */
if
(
ptyfd
!=
ofd
)
{
dup2
(
ptyfd
,
ofd
);
close
(
ptyfd
);
ptyfd
=
ofd
;
}
if
(
fcntl
(
ptyfd
,
F_SETFL
,
O_NONBLOCK
)
<
0
)
die
(
"fcntl(O_NONBLOCK): %s"
,
Ptyname
,
geterr
(
errno
));
dolog
(
LOG_NOTICE
,
"pty reset"
);
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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