From owner-svn-src-head@FreeBSD.ORG Sun Jun 6 12:14:49 2010 Return-Path: Delivered-To: svn-src-head@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 906661065674; Sun, 6 Jun 2010 12:14:49 +0000 (UTC) (envelope-from ache@nagual.pp.ru) Received: from nagual.pp.ru (nagual.pp.ru [194.87.13.69]) by mx1.freebsd.org (Postfix) with ESMTP id DDC7D8FC12; Sun, 6 Jun 2010 12:14:48 +0000 (UTC) Received: from nagual.pp.ru (ache@localhost [127.0.0.1]) by nagual.pp.ru (8.14.4/8.14.4) with ESMTP id o56CEkiW082930; Sun, 6 Jun 2010 16:14:46 +0400 (MSD) (envelope-from ache@nagual.pp.ru) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=nagual.pp.ru; s=default; t=1275826486; bh=0blCCcpHfXpl3oUUSu0t/9p/qkX9MsdRcXyN/S8N0i8=; l=1236; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:In-Reply-To; b=bvhj+lW8vpbfSYBPhca7Teg6E/aramf2fMKZ7NlY8p6ksiwR/GePEqxzChQWs0bhl k1UYIn1ZOMFSyQWd68B7Fu+VUTf7clfYAO3Tx8pjy4XMshe10blWnamjp5GkspxbB1 qDu0BeKOwFvTtIp9sZQWNrOAKO5bHnQg6E5PXg5g= Received: (from ache@localhost) by nagual.pp.ru (8.14.4/8.14.4/Submit) id o56CEjDE082928; Sun, 6 Jun 2010 16:14:46 +0400 (MSD) (envelope-from ache) Date: Sun, 6 Jun 2010 16:14:45 +0400 From: Andrey Chernov To: Kostik Belousov Message-ID: <20100606121444.GA82819@nagual.pp.ru> Mail-Followup-To: Andrey Chernov , Kostik Belousov , Gabor Kovesdan , src-committers@FreeBSD.ORG, svn-src-all@FreeBSD.ORG, svn-src-head@FreeBSD.ORG References: <201006061136.o56Ba9tr029717@svn.freebsd.org> <20100606120004.GH83316@deviant.kiev.zoral.com.ua> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="HcAYCG3uE/tztfnV" Content-Disposition: inline In-Reply-To: <20100606120004.GH83316@deviant.kiev.zoral.com.ua> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: svn-src-head@FreeBSD.ORG, svn-src-all@FreeBSD.ORG, src-committers@FreeBSD.ORG, Gabor Kovesdan Subject: Re: svn commit: r208868 - in head/usr.bin: bc dc X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Jun 2010 12:14:49 -0000 --HcAYCG3uE/tztfnV Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Jun 06, 2010 at 03:00:04PM +0300, Kostik Belousov wrote: > On Sun, Jun 06, 2010 at 11:36:09AM +0000, Gabor Kovesdan wrote: > > @@ -223,14 +222,11 @@ static const struct jump_entry jump_tabl > > (sizeof(jump_table_data)/sizeof(jump_table_data[0])) > > =20 > > static void > > -sighandler(int ignored) > > +got_sigint(int ignored __unused) > > { > > =20 > > - switch (ignored) > > - { > > - default: > > - bmachine.interrupted =3D true; > > - } > > + putchar('\n'); > > + exit(0); > > } > In general, calling not async-signal safe functions from the signal > handler is an invitation for undefined behaviour, that usually manifests > itself as SIGSEGV and SIGBUS. Yes, better use write(2) and _exit(2) here. --=20 http://ache.pp.ru/ --HcAYCG3uE/tztfnV Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (FreeBSD) iEYEARECAAYFAkwLkTQACgkQVg5YK5ZEdN1AdwCgmh3w4ttX7v+kqlLVOeKSBxSu A00AoKDR+1aqTKmR4FVoxt+pVwobUOvO =ZxvZ -----END PGP SIGNATURE----- --HcAYCG3uE/tztfnV--