music_cmd.c
branchSDL-1.2
changeset 893 3d9130c0136d
parent 892 9dd046cb6cd7
equal deleted inserted replaced
892:9dd046cb6cd7 893:3d9130c0136d
   168 		    /* Execute the command */
   168 		    /* Execute the command */
   169 		    strcpy(command, music->cmd);
   169 		    strcpy(command, music->cmd);
   170 		    argv = parse_args(command, music->file);
   170 		    argv = parse_args(command, music->file);
   171 		    if ( argv != NULL ) {
   171 		    if ( argv != NULL ) {
   172 			execvp(argv[0], argv);
   172 			execvp(argv[0], argv);
       
   173 
       
   174 			/* exec() failed */
       
   175 			perror(argv[0]);
   173 		    }
   176 		    }
   174 
       
   175 		    /* exec() failed */
       
   176 		    perror(argv[0]);
       
   177 		    _exit(-1);
   177 		    _exit(-1);
   178 		}
   178 		}
   179 		break;
   179 		break;
   180 
   180 
   181 	    /* Parent process - executes here */
   181 	    /* Parent process - executes here */