|
@@ -133,7 +133,7 @@ static int split_args ( char *args, char * argv[] ) {
|
133
|
133
|
int system ( const char *command ) {
|
134
|
134
|
char *args;
|
135
|
135
|
int argc;
|
136
|
|
- int rc;
|
|
136
|
+ int rc = 0;
|
137
|
137
|
|
138
|
138
|
/* Obtain temporary modifiable copy of command line */
|
139
|
139
|
args = strdup ( command );
|
|
@@ -144,12 +144,14 @@ int system ( const char *command ) {
|
144
|
144
|
argc = split_args ( args, NULL );
|
145
|
145
|
|
146
|
146
|
/* Create argv array and execute command */
|
147
|
|
- {
|
|
147
|
+ if ( argc ) {
|
148
|
148
|
char * argv[argc + 1];
|
149
|
149
|
|
150
|
150
|
split_args ( args, argv );
|
151
|
151
|
argv[argc] = NULL;
|
152
|
|
- rc = execv ( argv[0], argv );
|
|
152
|
+
|
|
153
|
+ if ( argv[0][0] != '#' )
|
|
154
|
+ rc = execv ( argv[0], argv );
|
153
|
155
|
}
|
154
|
156
|
|
155
|
157
|
free ( args );
|