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
2aac071b
Unverified
Commit
2aac071b
authored
Feb 27, 2018
by
Christian Brauner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
console: lxc_terminal_delete()
Signed-off-by:
Christian Brauner
<
christian.brauner@ubuntu.com
>
parent
a8e36388
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
7 additions
and
7 deletions
+7
-7
attach.c
src/lxc/attach.c
+2
-2
console.c
src/lxc/console.c
+3
-3
console.h
src/lxc/console.h
+1
-1
start.c
src/lxc/start.c
+1
-1
No files found.
src/lxc/attach.c
View file @
2aac071b
...
@@ -996,7 +996,7 @@ static int lxc_attach_pty(struct lxc_conf *conf, struct lxc_pty *pty)
...
@@ -996,7 +996,7 @@ static int lxc_attach_pty(struct lxc_conf *conf, struct lxc_pty *pty)
return
0
;
return
0
;
on_error:
on_error:
lxc_
console
_delete
(
pty
);
lxc_
terminal
_delete
(
pty
);
lxc_pty_conf_free
(
pty
);
lxc_pty_conf_free
(
pty
);
return
-
1
;
return
-
1
;
}
}
...
@@ -1386,7 +1386,7 @@ int lxc_attach(const char *name, const char *lxcpath,
...
@@ -1386,7 +1386,7 @@ int lxc_attach(const char *name, const char *lxcpath,
(
void
)
wait_for_pid
(
to_cleanup_pid
);
(
void
)
wait_for_pid
(
to_cleanup_pid
);
if
(
options
->
attach_flags
&
LXC_ATTACH_ALLOCATE_PTY
)
{
if
(
options
->
attach_flags
&
LXC_ATTACH_ALLOCATE_PTY
)
{
lxc_
console
_delete
(
&
pty
);
lxc_
terminal
_delete
(
&
pty
);
lxc_pty_conf_free
(
&
pty
);
lxc_pty_conf_free
(
&
pty
);
}
}
lxc_proc_put_context_info
(
init_ctx
);
lxc_proc_put_context_info
(
init_ctx
);
...
...
src/lxc/console.c
View file @
2aac071b
...
@@ -738,7 +738,7 @@ int lxc_terminal_write_ringbuffer(struct lxc_pty *console)
...
@@ -738,7 +738,7 @@ int lxc_terminal_write_ringbuffer(struct lxc_pty *console)
return
0
;
return
0
;
}
}
void
lxc_
console
_delete
(
struct
lxc_pty
*
console
)
void
lxc_
terminal
_delete
(
struct
lxc_pty
*
console
)
{
{
int
ret
;
int
ret
;
...
@@ -870,7 +870,7 @@ int lxc_pty_create(struct lxc_pty *console)
...
@@ -870,7 +870,7 @@ int lxc_pty_create(struct lxc_pty *console)
return
0
;
return
0
;
err
:
err
:
lxc_
console
_delete
(
console
);
lxc_
terminal
_delete
(
console
);
return
-
ENODEV
;
return
-
ENODEV
;
}
}
...
@@ -901,7 +901,7 @@ int lxc_console_create(struct lxc_conf *conf)
...
@@ -901,7 +901,7 @@ int lxc_console_create(struct lxc_conf *conf)
return
0
;
return
0
;
err
:
err
:
lxc_
console
_delete
(
console
);
lxc_
terminal
_delete
(
console
);
return
-
ENODEV
;
return
-
ENODEV
;
}
}
...
...
src/lxc/console.h
View file @
2aac071b
...
@@ -98,7 +98,7 @@ extern int lxc_console_create(struct lxc_conf *);
...
@@ -98,7 +98,7 @@ extern int lxc_console_create(struct lxc_conf *);
* /dev/tty)
* /dev/tty)
* Registered handlers in a mainloop are not automatically deleted.
* Registered handlers in a mainloop are not automatically deleted.
*/
*/
extern
void
lxc_
console
_delete
(
struct
lxc_pty
*
);
extern
void
lxc_
terminal
_delete
(
struct
lxc_pty
*
);
/*
/*
* lxc_terminal_free: mark the console or a tty as unallocated, free any
* lxc_terminal_free: mark the console or a tty as unallocated, free any
...
...
src/lxc/start.c
View file @
2aac071b
...
@@ -950,7 +950,7 @@ void lxc_fini(const char *name, struct lxc_handler *handler)
...
@@ -950,7 +950,7 @@ void lxc_fini(const char *name, struct lxc_handler *handler)
if
(
ret
<
0
)
if
(
ret
<
0
)
WARN
(
"%s - Failed to restore signal mask"
,
strerror
(
errno
));
WARN
(
"%s - Failed to restore signal mask"
,
strerror
(
errno
));
lxc_
console
_delete
(
&
handler
->
conf
->
console
);
lxc_
terminal
_delete
(
&
handler
->
conf
->
console
);
lxc_delete_tty
(
&
handler
->
conf
->
tty_info
);
lxc_delete_tty
(
&
handler
->
conf
->
tty_info
);
/* The command socket is now closed, no more state clients can register
/* The command socket is now closed, no more state clients can register
...
...
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