Skip to content
Permalink
Browse files

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.
  • Loading branch information
slouken committed Oct 11, 2009
1 parent d64ecb9 commit 87a9ed485464555a1a9510d6f0c5b05498e09c39
Showing with 7 additions and 0 deletions.
  1. +7 −0 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);

0 comments on commit 87a9ed4

Please sign in to comment.