sdlmusic.c: disable FORK_EXEC_MIDI.

Also, if it were to be reenabled again, use execv() instead of execvp(),
i.e. don't look up $PATH for the executable.

git-svn-id: https://svn.eduke32.com/eduke32@4167 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
helixhorned 2013-11-16 18:47:23 +00:00
parent 863aae3fb1
commit 2972155f14

View file

@ -43,7 +43,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "music.h"
#if !defined _WIN32 && !defined(GEKKO)
# define FORK_EXEC_MIDI 1
//# define FORK_EXEC_MIDI 1
#endif
#if defined FORK_EXEC_MIDI // fork/exec based external midi player
@ -216,7 +216,7 @@ int32_t MUSIC_Init(int32_t SoundCard, int32_t Address)
perror("MUSIC_Init: mprotect");
goto fallback;
}
/*
# if 0
{
int i;
initprintf("----Music argv:\n");
@ -224,7 +224,7 @@ int32_t MUSIC_Init(int32_t SoundCard, int32_t Address)
initprintf(" %s\n", external_midi_argv[i]);
initprintf("----\n");
}
*/
# endif
#endif
music_initialized = 1;
return(MUSIC_Ok);
@ -406,8 +406,8 @@ static void playmusic()
}
else if (pid==0) // child
{
// exec with PATH lookup
if (execvp(external_midi_argv[0], external_midi_argv) < 0)
// exec without PATH lookup
if (execv(external_midi_argv[0], external_midi_argv) < 0)
{
perror("execv");
_exit(1);