Eugene Toder reports: When I abort the playback using Ctrl-C I get the following error: Assertion 'pthread_mutex_destroy(&m->mutex) == 0' failed at pulsecore/mutex-posix.c:83, function pa_mutex_free(). Aborting. Aborted (core dumped) This happens because xmp registers a signal handler for SIGINT that calls sound->deinit(). For the PulseAudio driver this calls pa_simple_free(), which is apparently not happy to be called from a signal handler. Commenting out the call to deinit() fixes the problem, and seems to work well for both OSS and PulseAudio. Generally speaking, calling deinit() from a signal handler is dangerous -- it's likely to call free() or similar, which is not signal safe. Is this necessary? If the idea is to have a graceful shutdown on Ctrl-C, the handler should set a flag or use longjmp() to exit the play loop in main(). Also, attempting a graceful shutdown for SIGFPE and especially SIGSEGV is probably not a good idea. Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>master
parent
ecc0528155
commit
ccfebb0ba6
2 changed files with 7 additions and 1 deletions
Loading…
Reference in new issue