File 0010-aplay-Avoid-recursive-signal-handling.patch of Package alsa-utils

From a3ebe640a74d4a0e8acd15e31dd83c210b3c1be4 Mon Sep 17 00:00:00 2001
From: Takashi Iwai <tiwai@suse.de>
Date: Fri, 3 Jun 2011 12:44:17 +0200
Subject: [PATCH 10/16] aplay: Avoid recursive signal handling

When abort() is issued in snd_pcm_close() path, it may loop recursively
and crash.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
 aplay/aplay.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/aplay/aplay.c b/aplay/aplay.c
index 04959b8..72852b0 100644
--- a/aplay/aplay.c
+++ b/aplay/aplay.c
@@ -358,6 +358,12 @@ static void prg_exit(int code)
 
 static void signal_handler(int sig)
 {
+	static int in_aborting;
+
+	if (in_aborting)
+		return;
+
+	in_aborting = 1;
 	if (verbose==2)
 		putchar('\n');
 	if (!quiet_mode)
-- 
1.7.5.3
openSUSE Build Service is sponsored by