Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 24 Oct 2009 19:44:03 +0400
From:      Eygene Ryabinkin <rea-fbsd@codelabs.ru>
To:        Jilles Tjoelker <jilles@stack.nl>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: help needed to fix contrib/ee crash/exit when receiving SIGWINCH
Message-ID:  </T1DGlF/Y0lRu2962I5jFPsL2z0@o4mxXvBE73U5l9jb%2BzQrfwtfmX0>
In-Reply-To: <20091024120434.GA27808@stack.nl>
References:  <permail-20091023104227f0889e8400002915-a_best01@message-id.uni-muenster.de> <86tyxqqpwh.fsf@ds4.des.no> <8gJJDa6kRsCUwxK/zidtHIOFMRw@LbQSLh99U4wa807TkC1GazBU7WI> <20091024120434.GA27808@stack.nl>

next in thread | previous in thread | raw e-mail | index | archive | help
Sat, Oct 24, 2009 at 02:04:34PM +0200, Jilles Tjoelker wrote:
> That should be:
> -----
> do
> 	in = wgetch(text_win);
> while (in == -1 && errno == EINTR);
> if (in == -1)
> 	exit(0);
> -----
> 
> errno should only be checked after failed function calls or for
> functions where it is documented that errno should be used to check for
> error conditions (example: readdir).

True, thanks for correction!
-- 
Eygene
 _                ___       _.--.   #
 \`.|\..----...-'`   `-._.-'_.-'`   #  Remember that it is hard
 /  ' `         ,       __.--'      #  to read the on-line manual
 )/' _/     \   `-_,   /            #  while single-stepping the kernel.
 `-'" `"\_  ,_.-;_.-\_ ',  fsc/as   #
     _.-'_./   {_.'   ; /           #    -- FreeBSD Developers handbook
    {_.-``-'         {_/            #



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?/T1DGlF/Y0lRu2962I5jFPsL2z0>