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
5c28be22
Unverified
Commit
5c28be22
authored
Aug 21, 2018
by
Christian Brauner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
macro: s/rexit()/_exit()/g
Signed-off-by:
Christian Brauner
<
christian.brauner@ubuntu.com
>
parent
ca4eb982
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
15 deletions
+7
-15
attach.c
src/lxc/attach.c
+7
-15
No files found.
src/lxc/attach.c
View file @
5c28be22
...
@@ -652,14 +652,6 @@ static void lxc_attach_get_init_uidgid(uid_t *init_uid, gid_t *init_gid)
...
@@ -652,14 +652,6 @@ static void lxc_attach_get_init_uidgid(uid_t *init_uid, gid_t *init_gid)
*/
*/
}
}
/* Help the optimizer along if it doesn't know that exit always exits. */
#define rexit(c) \
do { \
int __c = (c); \
_exit(__c); \
return __c; \
} while (0)
/* Define default options if no options are supplied by the user. */
/* Define default options if no options are supplied by the user. */
static
lxc_attach_options_t
attach_static_default_options
=
LXC_ATTACH_OPTIONS_DEFAULT
;
static
lxc_attach_options_t
attach_static_default_options
=
LXC_ATTACH_OPTIONS_DEFAULT
;
...
@@ -986,11 +978,11 @@ static int attach_child_main(struct attach_clone_payload *payload)
...
@@ -986,11 +978,11 @@ static int attach_child_main(struct attach_clone_payload *payload)
}
}
/* We're done, so we can now do whatever the user intended us to do. */
/* We're done, so we can now do whatever the user intended us to do. */
r
exit
(
payload
->
exec_function
(
payload
->
exec_payload
));
_
exit
(
payload
->
exec_function
(
payload
->
exec_payload
));
on_error:
on_error:
lxc_put_attach_clone_payload
(
payload
);
lxc_put_attach_clone_payload
(
payload
);
r
exit
(
EXIT_FAILURE
);
_
exit
(
EXIT_FAILURE
);
}
}
static
int
lxc_attach_terminal
(
struct
lxc_conf
*
conf
,
static
int
lxc_attach_terminal
(
struct
lxc_conf
*
conf
,
...
@@ -1447,7 +1439,7 @@ int lxc_attach(const char *name, const char *lxcpath,
...
@@ -1447,7 +1439,7 @@ int lxc_attach(const char *name, const char *lxcpath,
if
(
ret
!=
sizeof
(
status
))
{
if
(
ret
!=
sizeof
(
status
))
{
shutdown
(
ipc_sockets
[
1
],
SHUT_RDWR
);
shutdown
(
ipc_sockets
[
1
],
SHUT_RDWR
);
lxc_proc_put_context_info
(
init_ctx
);
lxc_proc_put_context_info
(
init_ctx
);
rexit
(
-
1
);
_exit
(
EXIT_FAILURE
);
}
}
TRACE
(
"Intermediate process starting to initialize"
);
TRACE
(
"Intermediate process starting to initialize"
);
...
@@ -1460,7 +1452,7 @@ int lxc_attach(const char *name, const char *lxcpath,
...
@@ -1460,7 +1452,7 @@ int lxc_attach(const char *name, const char *lxcpath,
ERROR
(
"Failed to enter namespaces"
);
ERROR
(
"Failed to enter namespaces"
);
shutdown
(
ipc_sockets
[
1
],
SHUT_RDWR
);
shutdown
(
ipc_sockets
[
1
],
SHUT_RDWR
);
lxc_proc_put_context_info
(
init_ctx
);
lxc_proc_put_context_info
(
init_ctx
);
rexit
(
-
1
);
_exit
(
EXIT_FAILURE
);
}
}
/* close namespace file descriptors */
/* close namespace file descriptors */
...
@@ -1491,7 +1483,7 @@ int lxc_attach(const char *name, const char *lxcpath,
...
@@ -1491,7 +1483,7 @@ int lxc_attach(const char *name, const char *lxcpath,
SYSERROR
(
"Failed to clone attached process"
);
SYSERROR
(
"Failed to clone attached process"
);
shutdown
(
ipc_sockets
[
1
],
SHUT_RDWR
);
shutdown
(
ipc_sockets
[
1
],
SHUT_RDWR
);
lxc_proc_put_context_info
(
init_ctx
);
lxc_proc_put_context_info
(
init_ctx
);
rexit
(
-
1
);
_exit
(
EXIT_FAILURE
);
}
}
if
(
pid
==
0
)
{
if
(
pid
==
0
)
{
...
@@ -1516,14 +1508,14 @@ int lxc_attach(const char *name, const char *lxcpath,
...
@@ -1516,14 +1508,14 @@ int lxc_attach(const char *name, const char *lxcpath,
*/
*/
shutdown
(
ipc_sockets
[
1
],
SHUT_RDWR
);
shutdown
(
ipc_sockets
[
1
],
SHUT_RDWR
);
lxc_proc_put_context_info
(
init_ctx
);
lxc_proc_put_context_info
(
init_ctx
);
rexit
(
-
1
);
_exit
(
EXIT_FAILURE
);
}
}
TRACE
(
"Sending pid %d of attached process"
,
pid
);
TRACE
(
"Sending pid %d of attached process"
,
pid
);
/* The rest is in the hands of the initial and the attached process. */
/* The rest is in the hands of the initial and the attached process. */
lxc_proc_put_context_info
(
init_ctx
);
lxc_proc_put_context_info
(
init_ctx
);
r
exit
(
0
);
_
exit
(
0
);
}
}
int
lxc_attach_run_command
(
void
*
payload
)
int
lxc_attach_run_command
(
void
*
payload
)
...
...
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