mirror of
https://github.com/alsa-project/alsa-utils
synced 2024-12-22 22:56:31 +01:00
aplay: Fix uninterruptible aplay
When aplay is invoked to play from stdin, it can't be terminated by normal signals like SIGTERM or SIGINT. It's because our signal handler tries to trap as much as possible while the stalling point is not in the PCM loop but rather the file I/O. For fixing this, leave our signal handler once when a signal is received and snd_pcm_abort() is called. At the next hit, it shall be handled normally. Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
parent
9aa5c271f4
commit
46b6082756
1 changed files with 1 additions and 1 deletions
|
@ -399,7 +399,7 @@ static void signal_handler(int sig)
|
|||
handle = NULL;
|
||||
prg_exit(EXIT_FAILURE);
|
||||
}
|
||||
signal(sig, signal_handler);
|
||||
signal(sig, SIG_DFL);
|
||||
}
|
||||
|
||||
/* call on SIGUSR1 signal. */
|
||||
|
|
Loading…
Reference in a new issue