Date: Sun, 6 Jun 2010 15:00:04 +0300 From: Kostik Belousov <kostikbel@gmail.com> To: Gabor Kovesdan <gabor@freebsd.org> 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 Message-ID: <20100606120004.GH83316@deviant.kiev.zoral.com.ua> In-Reply-To: <201006061136.o56Ba9tr029717@svn.freebsd.org> References: <201006061136.o56Ba9tr029717@svn.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
[-- Attachment #1 --]
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]))
>
> static void
> -sighandler(int ignored)
> +got_sigint(int ignored __unused)
> {
>
> - switch (ignored)
> - {
> - default:
> - bmachine.interrupted = 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.
[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (FreeBSD)
iEYEARECAAYFAkwLjcMACgkQC3+MBN1Mb4ivNgCgpSTAlwDcw28lxBwdUIqoulUa
vpoAoIs9tUG9zJnh3R9iEfcNBniM5JK2
=EjLK
-----END PGP SIGNATURE-----
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20100606120004.GH83316>
