Skip to content

Commit

Permalink
Fixed bug #357
Browse files Browse the repository at this point in the history
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 87a9ed4
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions music_cmd.c
Expand Up @@ -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);
Expand Down

0 comments on commit 87a9ed4

Please sign in to comment.