2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-08-31 14:25:49 +00:00

Don't use standard descriptors for logging

The standard descriptors may be redirected.

crtool dumplicates stderr in rlimit.maxfileno-1 and this descriptor
is inherited by all children and will be closed before sigreturn.

Known issues:

 - The logging descriptor may be used by a target process and
   a resume will fail.

Signed-off-by: Andrey Vagin <avagin@openvz.org>
Acked-by: Pavel Emelyanov <xemul@parallels.com>
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
This commit is contained in:
Andrey Vagin
2011-12-05 12:07:52 +04:00
committed by Cyrill Gorcunov
parent e57a4c2945
commit 2c237b6973
4 changed files with 34 additions and 1 deletions

View File

@@ -241,6 +241,9 @@ int main(int argc, char *argv[])
{ NULL, no_argument, NULL, 0 }
};
if (init_logging())
return 1;
BUILD_BUG_ON(PAGE_SIZE != PAGE_IMAGE_SIZE);
if (argc < 3)