From 5dcc1ca6a4094d7763e74a3f93bf510b0edc4f42 Mon Sep 17 00:00:00 2001 From: Johannes Henninger Date: Fri, 20 Feb 2015 14:11:03 +0100 Subject: [PATCH] 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: Johannes Henninger --- src/lxc/attach.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lxc/attach.c b/src/lxc/attach.c index 497e0d27d..f70e42e8e 100644 --- a/src/lxc/attach.c +++ b/src/lxc/attach.c @@ -575,7 +575,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; -- 2.47.2