Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
lxc
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chen Yisong
lxc
Commits
8ded9244
Unverified
Commit
8ded9244
authored
Feb 28, 2018
by
Christian Brauner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
terminal: lxc_terminal_create()
Signed-off-by:
Christian Brauner
<
christian.brauner@ubuntu.com
>
parent
49cd0656
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
6 deletions
+4
-6
terminal.c
src/lxc/terminal.c
+4
-6
No files found.
src/lxc/terminal.c
View file @
8ded9244
...
@@ -869,13 +869,11 @@ int lxc_terminal_create_log_file(struct lxc_terminal *terminal)
...
@@ -869,13 +869,11 @@ int lxc_terminal_create_log_file(struct lxc_terminal *terminal)
int
lxc_terminal_create
(
struct
lxc_terminal
*
terminal
)
int
lxc_terminal_create
(
struct
lxc_terminal
*
terminal
)
{
{
int
ret
,
saved_errno
;
int
ret
;
ret
=
openpty
(
&
terminal
->
master
,
&
terminal
->
slave
,
terminal
->
name
,
NULL
,
ret
=
openpty
(
&
terminal
->
master
,
&
terminal
->
slave
,
terminal
->
name
,
NULL
,
NULL
);
NULL
);
saved_errno
=
errno
;
if
(
ret
<
0
)
{
if
(
ret
<
0
)
{
ERROR
(
"%s - Failed to allocate a pty"
,
strerror
(
saved_errno
)
);
SYSERROR
(
"Failed to open terminal"
);
return
-
1
;
return
-
1
;
}
}
...
@@ -893,7 +891,7 @@ int lxc_terminal_create(struct lxc_terminal *terminal)
...
@@ -893,7 +891,7 @@ int lxc_terminal_create(struct lxc_terminal *terminal)
ret
=
lxc_terminal_peer_default
(
terminal
);
ret
=
lxc_terminal_peer_default
(
terminal
);
if
(
ret
<
0
)
{
if
(
ret
<
0
)
{
ERROR
(
"Failed to allocate
a peer pty device
"
);
ERROR
(
"Failed to allocate
proxy terminal
"
);
goto
err
;
goto
err
;
}
}
...
...
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