[CRIU] [PATCH 3/3] log: Fix typo in in fini_log

Cyrill Gorcunov gorcunov at openvz.org
Mon Feb 27 07:27:13 EST 2012


On Mon, Feb 27, 2012 at 04:10:43PM +0400, Kirill Kolyshkin wrote:
> On Feb 27, 2012 2:03 PM, "Cyrill Gorcunov" <gorcunov at openvz.org> wrote:
> >
> > Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
> > ---
> >  log.c |    2 +-
> >  1 files changed, 1 insertions(+), 1 deletions(-)
> >
> > diff --git a/log.c b/log.c
> > index de37b6b..f5b8594 100644
> > --- a/log.c
> > +++ b/log.c
> > @@ -67,7 +67,7 @@ void fini_log(void)
> >  {
> >        if (logfd != STDERR_FILENO &&
> >            logfd != STDIN_FILENO &&
> > -           logfd != STDERR_FILENO)
> > +           logfd != STDOUT_FILENO)
> 
> Maybe just
> (logfd > STDERR_FILENO)
> 
> Or, yet better, set a flag that it was us who opened logfd, so we should
> close it. Because in some situations 0, 1, 2 might not be stdin/out/err.
> 

Yes, I think plain > 3 would be enough. Mind to explain when standart
descriptors become non-standart ones?

	Cyrill


More information about the CRIU mailing list