]> git.alsa-project.org Git - alsa-lib.git/commit
async: Handle previously installed signal handler
authorEliot Miranda <eliot.miranda@gmail.com>
Wed, 1 Jun 2016 06:16:31 +0000 (08:16 +0200)
committerTakashi Iwai <tiwai@suse.de>
Wed, 1 Jun 2016 06:16:31 +0000 (08:16 +0200)
commitd39e1879b9c72d51fe1ca4aeb5ba742e97b2175a
tree4c3c0af7a535fbff5d35a76a48cadfc2dd6a26ba
parent614ce73d3d6eba13946f863bec24981d355902e1
async: Handle previously installed signal handler

The issue is with the signal handler installed and deinstalled in
alsa-lib async handler.  This code makes no attempt to remember any
previously installed signal handlers for SIGIO, if SIGIO is used.
Consequently it does not call any previous handlers from its own
handler once installed, and does not reinstall any previous handler
when deinstalling its handler.  Consequently, use of also-lib within
applications that depend on SIGIO will break those applications,
rendering them inoperative once alsa-lib is running because their
signal handlers are no longer called.

This patch does remember and restore any previous handler, and chains
calls to the handler if it exists.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
src/async.c