music_cmd.c
changeset 447 50248d0ec654
parent 386 695494546b3c
child 467 4b52401dda92
equal deleted inserted replaced
446:1b8e02c89ed8 447:50248d0ec654
   153 	    /* Child process - executes here */
   153 	    /* Child process - executes here */
   154 	    case 0: {
   154 	    case 0: {
   155 		    char command[PATH_MAX];
   155 		    char command[PATH_MAX];
   156 		    char **argv;
   156 		    char **argv;
   157 
   157 
       
   158 		    /* Unblock signals in case we're called from a thread */
       
   159 		    {
       
   160 			sigset_t mask;
       
   161 			sigemptyset(&mask);
       
   162 			sigprocmask(SIG_SETMASK, &mask, NULL);
       
   163 		    }
       
   164 
   158 		    /* Execute the command */
   165 		    /* Execute the command */
   159 		    strcpy(command, music->cmd);
   166 		    strcpy(command, music->cmd);
   160 		    argv = parse_args(command, music->file);
   167 		    argv = parse_args(command, music->file);
   161 		    if ( argv != NULL ) {
   168 		    if ( argv != NULL ) {
   162 			execvp(argv[0], argv);
   169 			execvp(argv[0], argv);