Skip to content

Commit

Permalink
Fixed use of system()
Browse files Browse the repository at this point in the history
  • Loading branch information
root committed Aug 1, 2016
1 parent f27b3e4 commit 082c074
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion run.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
cd bin
./cod4x18_dedrun +exec server.cfg +map mp_killhouse +set fs_homepath . +set developer 1 +set sv_nosteamnames 1
./cod4x18_dedrun +exec server.cfg +map mp_killhouse +set fs_homepath . +set developer 1
1 change: 1 addition & 0 deletions src/CoD4x_steamapi
Submodule CoD4x_steamapi added at 78bc08
6 changes: 5 additions & 1 deletion src/unix/sys_unix.c
Original file line number Diff line number Diff line change
Expand Up @@ -711,6 +711,7 @@ void* Sys_RunNewProcess(void* arg)
Q_strncpyz(cmdline, (const char*)arg, sizeof(cmdline));
free(arg);
system(cmdline);
return NULL;
}


Expand All @@ -723,6 +724,9 @@ void Sys_DoStartProcess( char *cmdline ) {
{
return;
}
Sys_CreateNewThread(Sys_RunNewProcess, &tid, mcmdline);
if(Sys_CreateNewThread(Sys_RunNewProcess, &tid, mcmdline) == qfalse)
{
free(mcmdline);
}

}
2 changes: 1 addition & 1 deletion src/version_build.h
Original file line number Diff line number Diff line change
@@ -1 +1 @@
#define BUILD_NUMBER 1432
#define BUILD_NUMBER 1437

0 comments on commit 082c074

Please sign in to comment.