[CRIU] [PATCH 5/6] parasite: Don't assign error number on logfd

Cyrill Gorcunov gorcunov at openvz.org
Tue Feb 14 10:20:42 EST 2012


On Tue, Feb 14, 2012 at 06:37:53PM +0400, Kir Kolyshkin wrote:
> On 02/14/2012 05:42 PM, Cyrill Gorcunov wrote:
> >In case if recv_fd failed we must not assign error
> >number as logfd, it's bloody wrong. Moreover, never
> >close descriptors which were not ever used or point
> >to standart descriptors.
> >
> >Signed-off-by: Cyrill Gorcunov<gorcunov at openvz.org>
> >---
> >  include/types.h |    1 +
> >  parasite.c      |   19 ++++++++++++++-----
> >  2 files changed, 15 insertions(+), 5 deletions(-)
> >
> >diff --git a/include/types.h b/include/types.h
> >index b329630..4ae0c88 100644
> >--- a/include/types.h
> >+++ b/include/types.h
> >@@ -10,6 +10,7 @@
> >  #define STDIN_FILENO	0
> >  #define STDOUT_FILENO	1
> >  #define STDERR_FILENO	2
> 
> Not really related to this patch, but these defines are there in unistd.h,
> and are used only by log.c which already includes unistd.h.
> 
> I suggest removing these three from here. A separate patch sent.
>

Thanks, Kir. I've queued your patch. Will merge it upstream soon.

	Cyrill


More information about the CRIU mailing list