music_cmd.c
changeset 467 4b52401dda92
parent 447 50248d0ec654
child 518 8bc9b5fd2aae
     1.1 --- a/music_cmd.c	Thu Nov 05 00:02:50 2009 +0000
     1.2 +++ b/music_cmd.c	Fri Nov 06 03:37:57 2009 +0000
     1.3 @@ -23,7 +23,7 @@
     1.4  
     1.5  /* This file supports an external command for playing music */
     1.6  
     1.7 -#if defined(unix) || defined(__MACOSX__) /* This is a UNIX-specific hack */
     1.8 +#ifdef CMD_MUSIC
     1.9  
    1.10  #include <sys/types.h>
    1.11  #include <sys/wait.h>
    1.12 @@ -143,7 +143,11 @@
    1.13  /* Start playback of a given music stream */
    1.14  void MusicCMD_Start(MusicCMD *music)
    1.15  {
    1.16 +#ifdef HAVE_FORK
    1.17  	music->pid = fork();
    1.18 +#else
    1.19 +	music->pid = vfork();
    1.20 +#endif
    1.21  	switch(music->pid) {
    1.22  	    /* Failed fork() system call */
    1.23  	    case -1:
    1.24 @@ -235,4 +239,4 @@
    1.25  	return(active);
    1.26  }
    1.27  
    1.28 -#endif /* unix */
    1.29 +#endif /* CMD_MUSIC */