mirror of
https://github.com/alsa-project/alsa-utils
synced 2024-12-22 13:46:30 +01:00
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:
parent
d67a965aec
commit
a3ebe640a7
1 changed files with 6 additions and 0 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue