From 87a9ed485464555a1a9510d6f0c5b05498e09c39 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Sun, 11 Oct 2009 08:40:35 +0000 Subject: [PATCH] Fixed bug #357 This was a sneaky one. When music loops, the looping music play call is done from the audio thread, and SDL threads block signals to avoid signal side effects. So we just need to unblock those signals before executing the new process. --- music_cmd.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/music_cmd.c b/music_cmd.c index e65ca328..c3e694b7 100644 --- a/music_cmd.c +++ b/music_cmd.c @@ -155,6 +155,13 @@ void MusicCMD_Start(MusicCMD *music) char command[PATH_MAX]; char **argv; + /* Unblock signals in case we're called from a thread */ + { + sigset_t mask; + sigemptyset(&mask); + sigprocmask(SIG_SETMASK, &mask, NULL); + } + /* Execute the command */ strcpy(command, music->cmd); argv = parse_args(command, music->file);