]> git.alsa-project.org Git - alsa-utils.git/commit
aplay: Fix uninterruptible aplay
authorTakashi Iwai <tiwai@suse.de>
Wed, 29 Apr 2015 16:01:58 +0000 (18:01 +0200)
committerTakashi Iwai <tiwai@suse.de>
Wed, 29 Apr 2015 16:01:58 +0000 (18:01 +0200)
commit46b60827568ca4aad15eeacbc9dcf8597986ca8e
tree4b615a767a711fded05272f46252084736dde91c
parent9aa5c271f4eb2e3481b4a5076eb025242215ad7f
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>
aplay/aplay.c