svn commit: r208868 - in head/usr.bin: bc dc

Kostik Belousov kostikbel at gmail.com
Sun Jun 6 12:00:09 UTC 2010


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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/svn-src-all/attachments/20100606/ca0184db/attachment.pgp


More information about the svn-src-all mailing list