util: shutdown log in cr_system_userns if error fd is negative
Otherwise error in case of exec error won't be printed The problem is that when err fd is negative, it's replaced by log fd. Then err is moved to STDERR (that means, that log_fd is _closed_). But log facility still consider log fd as valid and tries to use it to print error message in case of exec failure. Which is equal to writing to /dev/null, basically. This patch shutdown log, if err fd was negative, thus forcing criu to output exec error to STDERR (which was replaced by log fs, btw). Signed-off-by:Stanislav Kinsburskiy <skinsbursky@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
Showing
Please
register
or
sign in
to comment