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
f2faa8fa
Commit
f2faa8fa
authored
Apr 29, 2010
by
Michel Normand
Committed by
Daniel Lezcano
Apr 29, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add fd to ignore to lxc_check_inherited function
Signed-off-by:
Michel Normand
<
normand@fr.ibm.com
>
Signed-off-by:
Daniel Lezcano
<
dlezcano@fr.ibm.com
>
parent
4d2e2ec6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
start.c
src/lxc/start.c
+3
-3
start.h
src/lxc/start.h
+1
-1
No files found.
src/lxc/start.c
View file @
f2faa8fa
...
@@ -113,7 +113,7 @@ static int match_fd(int fd)
...
@@ -113,7 +113,7 @@ static int match_fd(int fd)
return
(
fd
==
0
||
fd
==
1
||
fd
==
2
);
return
(
fd
==
0
||
fd
==
1
||
fd
==
2
);
}
}
int
lxc_check_inherited
(
void
)
int
lxc_check_inherited
(
int
fd_to_ignore
)
{
{
struct
dirent
dirent
,
*
direntp
;
struct
dirent
dirent
,
*
direntp
;
int
fd
,
fddir
;
int
fd
,
fddir
;
...
@@ -143,7 +143,7 @@ int lxc_check_inherited(void)
...
@@ -143,7 +143,7 @@ int lxc_check_inherited(void)
fd
=
atoi
(
direntp
->
d_name
);
fd
=
atoi
(
direntp
->
d_name
);
if
(
fd
==
fddir
||
fd
==
lxc_log_fd
)
if
(
fd
==
fddir
||
fd
==
lxc_log_fd
||
fd
==
fd_to_ignore
)
continue
;
continue
;
if
(
match_fd
(
fd
))
if
(
match_fd
(
fd
))
...
@@ -535,7 +535,7 @@ int lxc_start(const char *name, char *const argv[], struct lxc_conf *conf)
...
@@ -535,7 +535,7 @@ int lxc_start(const char *name, char *const argv[], struct lxc_conf *conf)
int
err
=
-
1
;
int
err
=
-
1
;
int
status
;
int
status
;
if
(
lxc_check_inherited
())
if
(
lxc_check_inherited
(
-
1
))
return
-
1
;
return
-
1
;
handler
=
lxc_init
(
name
,
conf
);
handler
=
lxc_init
(
name
,
conf
);
...
...
src/lxc/start.h
View file @
f2faa8fa
...
@@ -46,7 +46,7 @@ extern int lxc_poll(const char *name, struct lxc_handler *handler);
...
@@ -46,7 +46,7 @@ extern int lxc_poll(const char *name, struct lxc_handler *handler);
extern
void
lxc_abort
(
const
char
*
name
,
struct
lxc_handler
*
handler
);
extern
void
lxc_abort
(
const
char
*
name
,
struct
lxc_handler
*
handler
);
extern
void
lxc_fini
(
const
char
*
name
,
struct
lxc_handler
*
handler
);
extern
void
lxc_fini
(
const
char
*
name
,
struct
lxc_handler
*
handler
);
extern
int
lxc_set_state
(
const
char
*
,
struct
lxc_handler
*
,
lxc_state_t
);
extern
int
lxc_set_state
(
const
char
*
,
struct
lxc_handler
*
,
lxc_state_t
);
extern
int
lxc_check_inherited
(
void
);
extern
int
lxc_check_inherited
(
int
fd_to_ignore
);
#endif
#endif
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