From owner-svn-src-all@FreeBSD.ORG Sun Jun 6 12:00:09 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 40E961065670; Sun, 6 Jun 2010 12:00:09 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id 9C4D48FC1D; Sun, 6 Jun 2010 12:00:08 +0000 (UTC) Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id o56C0HER035704 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 6 Jun 2010 15:00:17 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4) with ESMTP id o56C046V044084; Sun, 6 Jun 2010 15:00:04 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4/Submit) id o56C04lA044083; Sun, 6 Jun 2010 15:00:04 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Sun, 6 Jun 2010 15:00:04 +0300 From: Kostik Belousov To: Gabor Kovesdan Message-ID: <20100606120004.GH83316@deviant.kiev.zoral.com.ua> References: <201006061136.o56Ba9tr029717@svn.freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="WRFVI/CrBiF4s7LM" Content-Disposition: inline In-Reply-To: <201006061136.o56Ba9tr029717@svn.freebsd.org> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-2.7 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_20, DNS_FROM_OPENWHOIS autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r208868 - in head/usr.bin: bc dc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Jun 2010 12:00:09 -0000 --WRFVI/CrBiF4s7LM Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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. --WRFVI/CrBiF4s7LM Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (FreeBSD) iEYEARECAAYFAkwLjcMACgkQC3+MBN1Mb4ivNgCgpSTAlwDcw28lxBwdUIqoulUa vpoAoIs9tUG9zJnh3R9iEfcNBniM5JK2 =EjLK -----END PGP SIGNATURE----- --WRFVI/CrBiF4s7LM--