mirror of
https://github.com/xcat2/xNBA.git
synced 2024-12-14 07:11:32 +00:00
D'oh d'oh d'oh d'oh d'oh d'oh d'oh d'oh d'oh
This commit is contained in:
parent
cc697eeb1f
commit
a77b32aaf6
@ -119,9 +119,12 @@ static int split_args ( char *args, char * argv[] ) {
|
||||
* Execute the named command and arguments.
|
||||
*/
|
||||
int system ( const char *command ) {
|
||||
char *args = strdup ( command );
|
||||
char *args;
|
||||
int argc;
|
||||
|
||||
int rc;
|
||||
|
||||
/* Obtain temporary modifiable copy of command line */
|
||||
args = strdup ( command );
|
||||
if ( ! args )
|
||||
return -ENOMEM;
|
||||
|
||||
@ -134,6 +137,9 @@ int system ( const char *command ) {
|
||||
|
||||
split_args ( args, argv );
|
||||
argv[argc] = NULL;
|
||||
return execv ( argv[0], argv );
|
||||
rc = execv ( argv[0], argv );
|
||||
}
|
||||
|
||||
free ( args );
|
||||
return rc;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user