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>
This commit is contained in:
Takashi Iwai 2011-06-03 12:44:17 +02:00
parent d67a965aec
commit a3ebe640a7

View file

@ -358,6 +358,12 @@ static void prg_exit(int code)
static void signal_handler(int sig) static void signal_handler(int sig)
{ {
static int in_aborting;
if (in_aborting)
return;
in_aborting = 1;
if (verbose==2) if (verbose==2)
putchar('\n'); putchar('\n');
if (!quiet_mode) if (!quiet_mode)