Commit c02db614 by Johannes Henninger Committed by Stéphane Graber

attach: use _exit() instead of exit() in the intermediate child process

This prevents on_exit() and atexit() handlers registered by the parent process from being run in the forked intermediate process. Signed-off-by: 's avatarJohannes Henninger <johannes@henninger.io>
parent 5fa64b00
......@@ -655,7 +655,7 @@ struct attach_clone_payload {
static int attach_child_main(void* data);
/* 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 rexit(c) do { int __c = (c); _exit(__c); return __c; } while(0)
/* define default options if no options are supplied by the user */
static lxc_attach_options_t attach_static_default_options = LXC_ATTACH_OPTIONS_DEFAULT;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment