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
58f52a14
Commit
58f52a14
authored
Aug 01, 2017
by
Serge Hallyn
Committed by
GitHub
Aug 01, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1722 from brauner/2017-07-31/devpts_use_max_mount_option
devpts: use max=<count> option on mount
parents
f5cdd5ac
9d28c4f9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
1 deletion
+8
-1
conf.c
src/lxc/conf.c
+7
-1
console.c
src/tests/console.c
+1
-0
No files found.
src/lxc/conf.c
View file @
58f52a14
...
...
@@ -1332,7 +1332,8 @@ static int setup_pivot_root(const struct lxc_rootfs *rootfs)
static
int
lxc_setup_devpts
(
int
num_pts
)
{
int
ret
;
const
char
*
devpts_mntopts
=
"newinstance,ptmxmode=0666,mode=0620,gid=5"
;
const
char
*
default_devpts_mntopts
=
"newinstance,ptmxmode=0666,mode=0620,gid=5"
;
char
devpts_mntopts
[
256
];
if
(
!
num_pts
)
{
DEBUG
(
"no new devpts instance will be mounted since no pts "
...
...
@@ -1340,6 +1341,11 @@ static int lxc_setup_devpts(int num_pts)
return
0
;
}
ret
=
snprintf
(
devpts_mntopts
,
sizeof
(
devpts_mntopts
),
"%s,max=%d"
,
default_devpts_mntopts
,
num_pts
);
if
(
ret
<
0
||
(
size_t
)
ret
>=
sizeof
(
devpts_mntopts
))
return
-
1
;
/* Unmount old devpts instance. */
ret
=
access
(
"/dev/pts/ptmx"
,
F_OK
);
if
(
!
ret
)
{
...
...
src/tests/console.c
View file @
58f52a14
...
...
@@ -146,6 +146,7 @@ static int test_console(const char *lxcpath,
}
c
->
load_config
(
c
,
NULL
);
c
->
set_config_item
(
c
,
"lxc.tty.max"
,
TTYCNT_STR
);
c
->
set_config_item
(
c
,
"lxc.pty.max"
,
"1024"
);
c
->
save_config
(
c
,
NULL
);
c
->
want_daemonize
(
c
,
true
);
if
(
!
c
->
startl
(
c
,
0
,
NULL
))
{
...
...
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