From owner-freebsd-hackers@FreeBSD.ORG Sat Oct 24 15:44:07 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 08BDD106566B for ; Sat, 24 Oct 2009 15:44:07 +0000 (UTC) (envelope-from rea-fbsd@codelabs.ru) Received: from 0.mx.codelabs.ru (0.mx.codelabs.ru [144.206.177.45]) by mx1.freebsd.org (Postfix) with ESMTP id AF39F8FC18 for ; Sat, 24 Oct 2009 15:44:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=codelabs.ru; s=two; h=Date:From:To:Cc:Subject:Message-ID: Reply-To:References:MIME-Version:Content-Type:In-Reply-To: Sender; bh=cNPkMz6sZ0DmifhpTKnnUSfUD+43Xk6M1sypsbl9HS4=; b=iVJLk yZb7mGgLBI9Z428dRWFognlYl1RnHz9UW2kfnj6TYKTiaryu1j6QFE79BN6nXEts 2wC4FLo3/BSwfO4h8YskCJD2t4fcBS3Fte+16SgPpU79M1nXSC2++W5Ln+YZuzJa gX5Xd41fndM615xsyYEQkZJHaStXe5Z7CT0TKe7foonjEBLSvERSrzpHXJE3kI4/ SdEyI+9rE1BT1Sq57uVysLgMAIs3YjfZg1qZasYm6vbnlL06iA4cCOpescjrHdoe yWKYaL/MITTK1pLCO2k3YK5P9AJn7nx90cAvw/Uqpe3P8/QTlD+SLAXpOeW/B2TH uTlMLcAvzwWb1khtw== Received: from void.codelabs.ru (void.codelabs.ru [144.206.177.25]) by 0.mx.codelabs.ru with esmtpsa (TLSv1:AES256-SHA:256) id 1N1imj-000M4Y-5R; Sat, 24 Oct 2009 19:44:05 +0400 Date: Sat, 24 Oct 2009 19:44:03 +0400 From: Eygene Ryabinkin To: Jilles Tjoelker Message-ID: References: <86tyxqqpwh.fsf@ds4.des.no> <8gJJDa6kRsCUwxK/zidtHIOFMRw@LbQSLh99U4wa807TkC1GazBU7WI> <20091024120434.GA27808@stack.nl> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20091024120434.GA27808@stack.nl> Sender: rea-fbsd@codelabs.ru Cc: freebsd-hackers@freebsd.org Subject: Re: help needed to fix contrib/ee crash/exit when receiving SIGWINCH X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: rea-fbsd@codelabs.ru List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Oct 2009 15:44:07 -0000 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 {_.-``-' {_/ #